Documentation
¶
Index ¶
- func IsRuntimeMonitoring(runtimeID string) bool
- func MarkIfNotMonitoring(runtimeID string) bool
- func MarkRuntimeMonitoring(runtimeID string)
- func RuntimeMonitoringSnapshot() map[string]int
- func SetMonitoringRegistry(reg MonitoringRegistry)
- func UnmarkRuntimeMonitoring(runtimeID string)
- type MonitoringRegistry
- type Registry
- type Runtime
- type RuntimeEvent
- type RuntimeEventHandler
- type RuntimeImageManager
- type RuntimeInspection
- type RuntimeInspector
- type RuntimeMonitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRuntimeMonitoring ¶
IsRuntimeMonitoring reports whether runtimeID is currently monitored.
func MarkIfNotMonitoring ¶
MarkIfNotMonitoring atomically marks runtimeID as monitored if it is not already. Returns true if the runtimeID was newly marked.
func MarkRuntimeMonitoring ¶
func MarkRuntimeMonitoring(runtimeID string)
MarkRuntimeMonitoring marks runtimeID as actively monitored. It is reference-counted so multiple monitor goroutines for the same runtimeID can coexist safely.
func RuntimeMonitoringSnapshot ¶
RuntimeMonitoringSnapshot returns a copy of the process-global monitoring table. Key is runtimeID and value is monitoring reference count.
func SetMonitoringRegistry ¶
func SetMonitoringRegistry(reg MonitoringRegistry)
SetMonitoringRegistry replaces the process-global monitoring registry. Passing nil is ignored.
func UnmarkRuntimeMonitoring ¶
func UnmarkRuntimeMonitoring(runtimeID string)
UnmarkRuntimeMonitoring releases one monitoring reference for runtimeID.
Types ¶
type MonitoringRegistry ¶
type MonitoringRegistry interface {
Mark(runtimeID string)
Unmark(runtimeID string)
IsMonitoring(runtimeID string) bool
MarkIfNotMonitoring(runtimeID string) bool
Snapshot() map[string]int
}
MonitoringRegistry abstracts runtime monitoring membership operations. Implementations can be in-memory, Redis-backed, etc.
func NewInMemoryMonitoringRegistry ¶
func NewInMemoryMonitoringRegistry() MonitoringRegistry
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
type Runtime ¶
type Runtime interface {
Name() string
Create(ctx context.Context, spec *types.ContainerSpec) (string, error)
Start(ctx context.Context, runtimeID string) error
Stop(ctx context.Context, runtimeID string) error
Pause(ctx context.Context, runtimeID string) error
Resume(ctx context.Context, runtimeID string) error
Delete(ctx context.Context, runtimeID string) error
Logs(ctx context.Context, runtimeID string, tail int) (string, error)
SetEventHandler(handler RuntimeEventHandler)
Exec(ctx context.Context, runtimeID string, cmd []string) (string, error)
}
type RuntimeEvent ¶
type RuntimeEventHandler ¶
type RuntimeEventHandler interface {
OnEvent(event RuntimeEvent)
}
type RuntimeImageManager ¶
type RuntimeImageManager interface {
EnsureImage(ctx context.Context, image string, pullPolicy string) error
}
RuntimeImageManager is an optional extension interface for runtime-side image lifecycle operations used by ImageManager.
type RuntimeInspection ¶
RuntimeInspection carries runtime-specific inspect data used by manager/service.
type RuntimeInspector ¶
type RuntimeInspector interface {
Inspect(ctx context.Context, runtimeID string) (*RuntimeInspection, error)
}
RuntimeInspector is an optional extension interface. Implementations can expose inspect metadata (such as container internal IP) without forcing all runtimes.