client

package
v0.2.4-0...-e476a30 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLocal

func WithLocal(publisher events.Publisher) func(context.Context, shim.Config) (shimapi.ShimService, io.Closer, error)

WithLocal uses an in process shim

Types

type Client

type Client struct {
	shimapi.ShimService
	// contains filtered or unexported fields
}

Client is a shim client containing the connection to a shim

func New

func New(ctx context.Context, config shim.Config, opt Opt) (*Client, error)

New returns a new shim client

func (*Client) Close

func (c *Client) Close() error

Close the cient connection

func (*Client) IsAlive

func (c *Client) IsAlive(ctx context.Context) (bool, error)

IsAlive returns true if the shim can be contacted. NOTE: a negative answer doesn't mean that the process is gone.

func (*Client) KillShim

func (c *Client) KillShim(ctx context.Context) error

KillShim kills the shim forcefully and wait for the process to disappear

func (*Client) StopShim

func (c *Client) StopShim(ctx context.Context) error

StopShim signals the shim to exit and wait for the process to disappear

type Opt

Opt is an option for a shim client configuration

func WithConnect

func WithConnect(address string, onClose func()) Opt

WithConnect connects to an existing shim

func WithStart

func WithStart(binary, address, daemonAddress, cgroup string, debug bool, exitHandler func()) Opt

WithStart executes a new shim process

Jump to

Keyboard shortcuts

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