client

package
v0.2.1-0...-d3ae3b1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DontConnect is used to mark a socket to not be connected.
	DontConnect = "-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// Connect tries to connect the client to the specified image and runtime services.
	Connect(ConnectOptions) error
	// Close closes any existing client connections.
	Close()
	// CheckConnection checks if we have (un-Close()'d as opposed to working) connections.
	CheckConnection(ConnectOptions) error
	// HasRuntimeService checks if the client is configured with runtime services.
	HasRuntimeService() bool
	// HasImageService checks if the client is configured with image services.
	HasImageService() bool

	// We expose full image and runtime client services.
	api.ImageServiceClient
	api.RuntimeServiceClient
}

Client is the interface we expose to our CRI client.

func NewClient

func NewClient(options Options) (Client, error)

NewClient creates a new client instance.

type ConnectOptions

type ConnectOptions struct {
	// Wait indicates whether Connect() should wait (indefinitely) for the server.
	Wait bool
	// Reconnect indicates whether CheckConnection() should attempt to Connect().
	Reconnect bool
}

ConnectOptions contains options for connecting to the server.

type Options

type Options struct {
	// ImageSocket is the socket path for the CRI image service.
	ImageSocket string
	// RuntimeSocket is the socket path for the CRI runtime service.
	RuntimeSocket string
}

Options contains the configurable options of our CRI client.

Jump to

Keyboard shortcuts

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