Documentation
¶
Index ¶
- type KubernetesRuntime
- func (k *KubernetesRuntime) Create(ctx context.Context, spec *types.ContainerSpec) (string, error)
- func (k *KubernetesRuntime) Delete(ctx context.Context, runtimeID string) error
- func (k *KubernetesRuntime) EnsureImage(_ context.Context, imageName string, pullPolicy string) error
- func (k *KubernetesRuntime) Exec(_ context.Context, _ string, _ []string) (string, error)
- func (k *KubernetesRuntime) Inspect(ctx context.Context, runtimeID string) (*containerruntime.RuntimeInspection, error)
- func (k *KubernetesRuntime) Logs(ctx context.Context, runtimeID string, tail int) (string, error)
- func (k *KubernetesRuntime) Monitor(ctx context.Context, runtimeID string) error
- func (k *KubernetesRuntime) Name() string
- func (k *KubernetesRuntime) Pause(ctx context.Context, runtimeID string) error
- func (k *KubernetesRuntime) Resume(ctx context.Context, runtimeID string) error
- func (k *KubernetesRuntime) SetEventHandler(handler containerruntime.RuntimeEventHandler)
- func (k *KubernetesRuntime) Start(ctx context.Context, runtimeID string) error
- func (k *KubernetesRuntime) Stop(ctx context.Context, runtimeID string) error
- type KubernetesRuntimeConfig
- type KubernetesRuntimeMonitor
- type KubernetesRuntimeOption
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 NewKubernetesRuntimeWithOptions ¶
func NewKubernetesRuntimeWithOptions(cfg KubernetesRuntimeConfig, opts ...KubernetesRuntimeOption) (*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) Inspect ¶
func (k *KubernetesRuntime) Inspect(ctx context.Context, runtimeID string) (*containerruntime.RuntimeInspection, 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)
type KubernetesRuntimeConfig ¶
type KubernetesRuntimeOption ¶
type KubernetesRuntimeOption func(*KubernetesRuntime)
func WithKubernetesRuntimeMonitor ¶
func WithKubernetesRuntimeMonitor(monitor KubernetesRuntimeMonitor) KubernetesRuntimeOption
Click to show internal directories.
Click to hide internal directories.