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

kubernetes

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: Apache-2.0 Imports: 29 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 Runtime 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, workloadID string) (io.WriteCloser, io.ReadCloser, error)

AttachToWorkload implements runtime.Runtime.

func (*Client) BuildImage added in v0.0.32

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

BuildImage 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) (string, 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) ImageExists

func (*Client) ImageExists(_ context.Context, imageName string) (bool, error)

ImageExists implements runtime.Runtime.

func (*Client) IsWorkloadRunning added in v0.0.37

func (c *Client) IsWorkloadRunning(ctx context.Context, workloadID 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) PullImage

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

PullImage implements runtime.Runtime.

func (*Client) RemoveWorkload added in v0.0.37

func (c *Client) RemoveWorkload(ctx context.Context, workloadID 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.

func (*Client) VerifyImage added in v0.0.35

func (*Client) VerifyImage(_ context.Context, serverInfo *registry.Server, imageRef string) (bool, error)

VerifyImage verifies a container image

Jump to

Keyboard shortcuts

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