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) AttachToWorkload(ctx context.Context, workloadID string) (io.WriteCloser, io.ReadCloser, error)
- func (c *Client) DeployWorkload(ctx context.Context, image string, containerName string, command []string, ...) (string, int, error)
- func (c *Client) GetWorkloadInfo(ctx context.Context, workloadID string) (runtime.ContainerInfo, error)
- func (c *Client) GetWorkloadLogs(ctx context.Context, workloadID string, follow bool) (string, error)
- func (c *Client) IsRunning(ctx context.Context) error
- func (c *Client) IsWorkloadRunning(ctx context.Context, workloadID string) (bool, error)
- func (c *Client) ListWorkloads(ctx context.Context) ([]runtime.ContainerInfo, error)
- func (c *Client) RemoveWorkload(ctx context.Context, workloadID string) error
- func (*Client) StopWorkload(_ context.Context, _ string) error
Constants ¶
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 Deployer interface for container operations
func (*Client) AttachToWorkload ¶ added in v0.0.37
func (c *Client) AttachToWorkload(ctx context.Context, workloadID string) (io.WriteCloser, io.ReadCloser, error)
AttachToWorkload implements runtime.Runtime.
func (*Client) DeployWorkload ¶ added in v0.0.37
func (c *Client) DeployWorkload(ctx context.Context, image string, containerName string, command []string, envVars map[string]string, containerLabels map[string]string, _ *permissions.Profile, transportType string, options *runtime.DeployWorkloadOptions, _ bool, ) (string, int, error)
DeployWorkload implements runtime.Runtime.
func (*Client) GetWorkloadInfo ¶ added in v0.0.37
func (c *Client) GetWorkloadInfo(ctx context.Context, workloadID string) (runtime.ContainerInfo, error)
GetWorkloadInfo implements runtime.Runtime.
func (*Client) GetWorkloadLogs ¶ added in v0.0.37
func (c *Client) GetWorkloadLogs(ctx context.Context, workloadID string, follow bool) (string, error)
GetWorkloadLogs implements runtime.Runtime.
func (*Client) IsRunning ¶ added in v0.1.1
IsRunning checks the health of the container runtime. This is used to verify that the runtime is operational and can manage workloads.
func (*Client) IsWorkloadRunning ¶ added in v0.0.37
IsWorkloadRunning implements runtime.Runtime.
func (*Client) ListWorkloads ¶ added in v0.0.37
ListWorkloads implements runtime.Runtime.
func (*Client) RemoveWorkload ¶ added in v0.0.37
RemoveWorkload implements runtime.Runtime.