Documentation
¶
Overview ¶
Package kubernetes provides a client for the Kubernetes runtime including creating, starting, stopping, and retrieving container information.
Index ¶
- Constants
- type Client
- func (c *Client) AttachContainer(ctx context.Context, containerID string) (io.WriteCloser, io.ReadCloser, error)
- func (*Client) BuildImage(_ context.Context, _, _ string) error
- func (c *Client) ContainerLogs(ctx context.Context, containerID string) (string, error)
- func (c *Client) CreateContainer(ctx context.Context, image string, containerName string, command []string, ...) (string, error)
- func (c *Client) GetContainerInfo(ctx context.Context, containerID string) (runtime.ContainerInfo, error)
- func (*Client) ImageExists(_ context.Context, imageName string) (bool, error)
- func (c *Client) IsContainerRunning(ctx context.Context, containerID string) (bool, error)
- func (c *Client) ListContainers(ctx context.Context) ([]runtime.ContainerInfo, error)
- func (*Client) PullImage(_ context.Context, imageName string) error
- func (c *Client) RemoveContainer(ctx context.Context, containerID string) error
- func (*Client) StopContainer(_ context.Context, _ string) error
Constants ¶
View Source
const (
// UnknownStatus represents an unknown container status
UnknownStatus = "unknown"
)
Constants for container status
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements the Runtime interface for container operations
func (*Client) AttachContainer ¶
func (c *Client) AttachContainer(ctx context.Context, containerID string) (io.WriteCloser, io.ReadCloser, error)
AttachContainer implements runtime.Runtime.
func (*Client) BuildImage ¶ added in v0.0.10
BuildImage implements runtime.Runtime.
func (*Client) ContainerLogs ¶
ContainerLogs implements runtime.Runtime.
func (*Client) CreateContainer ¶
func (c *Client) CreateContainer(ctx context.Context, image string, containerName string, command []string, envVars map[string]string, containerLabels map[string]string, _ *permissions.Profile, transportType string, options *runtime.CreateContainerOptions) (string, error)
CreateContainer implements runtime.Runtime.
func (*Client) GetContainerInfo ¶
func (c *Client) GetContainerInfo(ctx context.Context, containerID string) (runtime.ContainerInfo, error)
GetContainerInfo implements runtime.Runtime.
func (*Client) ImageExists ¶
ImageExists implements runtime.Runtime.
func (*Client) IsContainerRunning ¶
IsContainerRunning implements runtime.Runtime.
func (*Client) ListContainers ¶
ListContainers implements runtime.Runtime.
func (*Client) RemoveContainer ¶
RemoveContainer implements runtime.Runtime.
Click to show internal directories.
Click to hide internal directories.