resource_executor

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoopResourceExecutor

type NoopResourceExecutor struct {
}

NoopResourceExecutor means no-operation for cri request, where no hook exists like ListContainerStats/ExecSync etc.

func (*NoopResourceExecutor) DeleteCheckpointIfNeed

func (n *NoopResourceExecutor) DeleteCheckpointIfNeed(request interface{}) error

func (*NoopResourceExecutor) GenerateHookRequest

func (n *NoopResourceExecutor) GenerateHookRequest() interface{}

func (*NoopResourceExecutor) GenerateResourceCheckpoint

func (n *NoopResourceExecutor) GenerateResourceCheckpoint() interface{}

func (*NoopResourceExecutor) GetMetaInfo

func (n *NoopResourceExecutor) GetMetaInfo() string

func (*NoopResourceExecutor) ParseRequest

func (n *NoopResourceExecutor) ParseRequest(request interface{}) (utils.CallHookPluginOperation, error)

func (*NoopResourceExecutor) ResourceCheckPoint

func (n *NoopResourceExecutor) ResourceCheckPoint(response interface{}) error

func (*NoopResourceExecutor) UpdateRequest added in v0.5.0

func (n *NoopResourceExecutor) UpdateRequest(response interface{}, request interface{}) error

type RuntimeResourceExecutor

type RuntimeResourceExecutor interface {
	GetMetaInfo() string
	GenerateHookRequest() interface{}
	// ParseRequest would be the first function after request intercepted, during which,
	// pod/container's meta/resource info would be parsed from request or loaded from local store,
	// and some hint info should also be offered during ParseRequest stage, e.g. to check if executor
	// should call hook plugins when pod/container is system component.
	ParseRequest(request interface{}) (utils.CallHookPluginOperation, error)
	ResourceCheckPoint(response interface{}) error
	DeleteCheckpointIfNeed(request interface{}) error
	UpdateRequest(response interface{}, request interface{}) error
}

func NewRuntimeResourceExecutor

func NewRuntimeResourceExecutor(runtimeResourceType RuntimeResourceType) RuntimeResourceExecutor

type RuntimeResourceType

type RuntimeResourceType string
const (
	RuntimePodResource       RuntimeResourceType = "RuntimePodResource"
	RuntimeContainerResource RuntimeResourceType = "RuntimeContainerResource"
	RuntimeNoopResource      RuntimeResourceType = "RuntimeNoopResource"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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