process

package
v1.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2023 License: MIT Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL