dynamicpolicy

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MemoryResourcePluginPolicyNameDynamic = "dynamic"
)

Variables

This section is empty.

Functions

func GetReadonlyState

func GetReadonlyState() (state.ReadonlyState, error)

func NewDynamicPolicy

func NewDynamicPolicy(agentCtx *agent.GenericContext, conf *config.Configuration, _ interface{}, agentName string) (bool, agent.Component, error)

Types

type DynamicPolicy

type DynamicPolicy struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*DynamicPolicy) Allocate

Allocate is called during pod admit so that the resource plugin can allocate corresponding resource for the container according to resource request

func (*DynamicPolicy) GetResourcePluginOptions

func (p *DynamicPolicy) GetResourcePluginOptions(context.Context, *pluginapi.Empty) (*pluginapi.ResourcePluginOptions, error)

GetResourcePluginOptions returns options to be communicated with Resource Manager

func (*DynamicPolicy) GetResourcesAllocation

GetResourcesAllocation returns allocation results of corresponding resources

func (*DynamicPolicy) GetTopologyAwareAllocatableResources

GetTopologyAwareAllocatableResources returns corresponding allocatable resources as topology aware format

func (*DynamicPolicy) GetTopologyAwareResources

GetTopologyAwareResources returns allocation results of corresponding resources as topology aware format

func (*DynamicPolicy) GetTopologyHints

GetTopologyHints returns hints of corresponding resources

func (*DynamicPolicy) Name

func (p *DynamicPolicy) Name() string

func (*DynamicPolicy) PreStartContainer

PreStartContainer is called, if indicated by resource plugin during registeration phase, before each container start. Resource plugin can run resource specific operations such as resetting the resource before making resources available to the container

func (*DynamicPolicy) RemovePod

func (*DynamicPolicy) ResourceName

func (p *DynamicPolicy) ResourceName() string

func (*DynamicPolicy) Start

func (p *DynamicPolicy) Start() (err error)

func (*DynamicPolicy) Stop

func (p *DynamicPolicy) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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