Help us shape the future of Go! Take the 2026 Go Developer Survey

kubernetes

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package kubernetes provides a client for the Kubernetes runtime including creating, starting, stopping, and retrieving container information.

Index

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 Deployer interface for container operations

func NewClient

func NewClient(_ context.Context) (*Client, error)

NewClient creates a new container client

func (*Client) AttachToWorkload added in v0.0.37

func (c *Client) AttachToWorkload(ctx context.Context, workloadName 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,
) (int, error)

DeployWorkload implements runtime.Runtime.

func (*Client) GetWorkloadInfo added in v0.0.37

func (c *Client) GetWorkloadInfo(ctx context.Context, workloadName string) (runtime.ContainerInfo, error)

GetWorkloadInfo implements runtime.Runtime.

func (*Client) GetWorkloadLogs added in v0.0.37

func (c *Client) GetWorkloadLogs(ctx context.Context, workloadName string, follow bool) (string, error)

GetWorkloadLogs implements runtime.Runtime.

func (*Client) IsRunning added in v0.1.1

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

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

func (c *Client) IsWorkloadRunning(ctx context.Context, workloadName string) (bool, error)

IsWorkloadRunning implements runtime.Runtime.

func (*Client) ListWorkloads added in v0.0.37

func (c *Client) ListWorkloads(ctx context.Context) ([]runtime.ContainerInfo, error)

ListWorkloads implements runtime.Runtime.

func (*Client) RemoveWorkload added in v0.0.37

func (c *Client) RemoveWorkload(ctx context.Context, workloadName string) error

RemoveWorkload implements runtime.Runtime.

func (*Client) StopWorkload added in v0.0.37

func (*Client) StopWorkload(_ context.Context, _ string) error

StopWorkload implements runtime.Runtime.

Jump to

Keyboard shortcuts

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