Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

    Client sends framed requests and receives framed responses from an external process.

    func NewClient

    func NewClient(cmd *exec.Cmd) (*Client, error)

      NewClient starts up the given external process and communicates with it over stdin and stdout using framed requests and responses.

      The Cmd MUST NOT have Stdout or Stdin set.

      func (*Client) Close

      func (c *Client) Close() error

        Close detaches from the external process and waits for it to exit.

        func (*Client) Send

        func (c *Client) Send(data []byte) ([]byte, error)

          Send sends the given frame to the external process and returns the response.

          Panics if Close was already called.

          Source Files