client

package
v0.0.0-...-70866ba Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachVMOptions

type AttachVMOptions struct {
	NumIOStreams int
}

AttachVMOptions holds extra arguments one can pass to the AttachVM function.

See the api.AttachVM payload for more details.

type AttachVMReturn

type AttachVMReturn api.AttachVMResponse

AttachVMReturn contains the return values from AttachVM.

See the api.AttachVM and api.AttachVMResponse payloads.

type Client

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

The Client struct can be used to issue proxy API calls with a convenient high level API.

func NewClient

func NewClient(conn net.Conn) *Client

NewClient creates a new client object to communicate with the proxy using the connection conn. The user should call Close() once finished with the client object to close conn.

func (*Client) AttachVM

func (client *Client) AttachVM(containerID string, options *AttachVMOptions) (*AttachVMReturn, error)

AttachVM wraps the api.AttachVM payload.

See the api.AttachVM payload description for more details.

func (*Client) Close

func (client *Client) Close()

Close a client, closing the underlying AF_UNIX socket.

func (*Client) ConnectShim

func (client *Client) ConnectShim(token string) error

ConnectShim wraps the api.CmdConnectShim command and associated api.ConnectShim payload.

func (*Client) DisconnectShim

func (client *Client) DisconnectShim() error

DisconnectShim wraps the api.CmdDisconnectShim command and associated api.DisconnectShim payload.

func (*Client) Hyper

func (client *Client) Hyper(hyperName string, hyperMessage interface{}) error

Hyper wraps the Hyper payload (see payload description for more details)

func (*Client) HyperWithTokens

func (client *Client) HyperWithTokens(hyperName string, tokens []string, hyperMessage interface{}) error

HyperWithTokens is a Hyper variant where the users can specify a list of I/O tokens.

See the api.Hyper payload description for more details.

func (*Client) Kill

func (client *Client) Kill(signal syscall.Signal) error

Kill wraps the api.CmdSignal command and can be used by a shim to send a signal to the associated process.

func (*Client) RegisterVM

func (client *Client) RegisterVM(containerID, ctlSerial, ioSerial string,
	options *RegisterVMOptions) (*RegisterVMReturn, error)

RegisterVM wraps the api.RegisterVM payload.

See payload description for more details.

func (*Client) SendTerminalSize

func (client *Client) SendTerminalSize(columns, rows int) error

SendTerminalSize wraps the api.CmdSignal command and can be used by a shim to send a new signal to the associated process.

func (*Client) UnregisterVM

func (client *Client) UnregisterVM(containerID string) error

UnregisterVM wraps the api.UnregisterVM payload.

See the api.UnregisterVM payload description for more details.

type RegisterVMOptions

type RegisterVMOptions struct {
	Console      string
	NumIOStreams int
}

RegisterVMOptions holds extra arguments one can pass to the RegisterVM function.

See the api.RegisterVM payload for more details.

type RegisterVMReturn

type RegisterVMReturn api.RegisterVMResponse

RegisterVMReturn contains the return values from RegisterVM.

See the api.RegisterVM and api.RegisterVMResponse payloads.

Jump to

Keyboard shortcuts

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