kubernetes

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubernetesRuntime

type KubernetesRuntime struct {
	// contains filtered or unexported fields
}

func NewKubernetesRuntime

func NewKubernetesRuntime(cfg KubernetesRuntimeConfig) (*KubernetesRuntime, error)

func (*KubernetesRuntime) Create

func (k *KubernetesRuntime) Create(ctx context.Context, spec *types.ContainerSpec) (string, error)

func (*KubernetesRuntime) Delete

func (k *KubernetesRuntime) Delete(ctx context.Context, runtimeID string) error

func (*KubernetesRuntime) EnsureImage

func (k *KubernetesRuntime) EnsureImage(_ context.Context, imageName string, pullPolicy string) error

EnsureImage satisfies containerruntime.RuntimeImageManager. For Kubernetes runtimes, image pull is performed by kubelet during pod scheduling. This method validates input and enforces pull-policy constraints that can be checked early.

func (*KubernetesRuntime) Exec

func (k *KubernetesRuntime) Exec(_ context.Context, _ string, _ []string) (string, error)

func (*KubernetesRuntime) Inspect

func (*KubernetesRuntime) Logs

func (k *KubernetesRuntime) Logs(ctx context.Context, runtimeID string, tail int) (string, error)

func (*KubernetesRuntime) Monitor

func (k *KubernetesRuntime) Monitor(ctx context.Context, runtimeID string) error

监控 deployment 和 job 的生命周期(启动与退出)。

func (*KubernetesRuntime) Name

func (k *KubernetesRuntime) Name() string

func (*KubernetesRuntime) Pause

func (k *KubernetesRuntime) Pause(ctx context.Context, runtimeID string) error

func (*KubernetesRuntime) Resume

func (k *KubernetesRuntime) Resume(ctx context.Context, runtimeID string) error

func (*KubernetesRuntime) SetEventHandler

func (k *KubernetesRuntime) SetEventHandler(handler containerruntime.RuntimeEventHandler)

func (*KubernetesRuntime) Start

func (k *KubernetesRuntime) Start(ctx context.Context, runtimeID string) error

func (*KubernetesRuntime) Stop

func (k *KubernetesRuntime) Stop(ctx context.Context, runtimeID string) error

type KubernetesRuntimeConfig

type KubernetesRuntimeConfig struct {
	RuntimeName string
	Namespace   string
	Kubeconfig  string
	InCluster   bool
}

type KubernetesRuntimeMonitor

type KubernetesRuntimeMonitor interface {
	Monitor(ctx context.Context, runtimeID string) error
}

type KubernetesRuntimeOption

type KubernetesRuntimeOption func(*KubernetesRuntime)

func WithKubernetesRuntimeMonitor

func WithKubernetesRuntimeMonitor(monitor KubernetesRuntimeMonitor) KubernetesRuntimeOption

Jump to

Keyboard shortcuts

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