package
0.0.0-20231126024412-02539191b02e
Repository: https://github.com/mjpitz/myago.git
Documentation: pkg.go.dev
# README
plugin
Package plugin provides a simple plugin interface by forking processes and using their stdout/stdin to enable communication between the parent process (main-component) and the child (plugin). This is inspired by how protoc and its various plugins work. Applications can read arguments, flags, and environment variables provided to the program to configure its behaviour, but then stream data from stdin to issue RPCs and write their responses to stdout.
import go.pitz.tech/lib/plugin
Usage
func DialContext
func DialContext(ctx context.Context, binary string, args ...string) *yarpc.ClientConn
DialContext returns a ClientConn whose dialer forks a process for the specified binary.
func Listen
func Listen() yarpc.Listener
Listen returns a yarpc.Listener that treats a processes stdin and stdout as a connection.
func Pipe
func Pipe() *pipe
Pipe returns a pseudo-async io.ReadWriteCloser.
# Packages
No description provided by the author
# Functions
DialContext returns a ClientConn whose dialer forks a process for the specified binary.
Listen returns a yarpc.Listener that treats a processes stdin and stdout as a connection.
Pipe returns a pseudo-async io.ReadWriteCloser.