Back to godoc.org

Package process

v1.25.0
Latest Go to latest

The latest major version is .

Published: Sep 10, 2020 | License: MIT | Module: go.uber.org/thriftrw

Index

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.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier