containerdcontroller

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func New

func New(cs *client.ClientSet, client *containerd.Client, rt runtime.Runtime, opts ...NewOption) *Controller

func (*Controller) AddHandler

func (c *Controller) AddHandler(h *RuntimeHandlerFuncs)

func (*Controller) HandleEvent

func (c *Controller) HandleEvent(handlers *RuntimeHandlerFuncs, obj any)

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context) error

Reconcile ensures that desired containers matches with containers in the runtime environment. It removes any containers that are not desired (missing from the server) and adds those missing from runtime. It is preferrably run early during startup of the controller.

func (*Controller) Run

func (c *Controller) Run(ctx context.Context)

type Event

type Event interface {
	ProtoMessage()
}

type NewOption

type NewOption func(*Controller)

func WithLogger

func WithLogger(l logger.Logger) NewOption

type RuntimeHandlerFuncs

type RuntimeHandlerFuncs struct {
	OnTaskExit         func(*events.TaskExit)
	OnTaskCreate       func(*events.TaskCreate)
	OnTaskStart        func(*events.TaskStart)
	OnTaskDelete       func(*events.TaskDelete)
	OnTaskIO           func(*events.TaskIO)
	OnTaskOOM          func(*events.TaskOOM)
	OnTaskExecAdded    func(*events.TaskExecAdded)
	OnTaskExecStarted  func(*events.TaskExecStarted)
	OnTaskPaused       func(*events.TaskPaused)
	OnTaskResumed      func(*events.TaskResumed)
	OnTaskCheckpointed func(*events.TaskCheckpointed)
	OnSnapshotPrepare  func(*events.SnapshotPrepare)
	OnSnapshotCommit   func(*events.SnapshotCommit)
	OnSnapshotRemove   func(*events.SnapshotRemove)
	OnNamespaceCreate  func(*events.NamespaceCreate)
	OnNamespaceUpdate  func(*events.NamespaceUpdate)
	OnNamespaceDelete  func(*events.NamespaceDelete)
	OnImageCreate      func(*events.ImageCreate)
	OnImageUpdate      func(*events.ImageUpdate)
	OnImageDelete      func(*events.ImageDelete)
	OnContainerCreate  func(*events.ContainerCreate)
	OnContainerUpdate  func(*events.ContainerUpdate)
	OnContainerDelete  func(*events.ContainerDelete)
	OnContentCreate    func(*events.ContentCreate)
	OnContentDelete    func(*events.ContentDelete)
}

Jump to

Keyboard shortcuts

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