staticpolicy

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IOResourcePluginPolicyNameStatic is the policy name of static io resource plugin
	IOResourcePluginPolicyNameStatic = string(consts.ResourcePluginPolicyNameStatic)
)

Variables

This section is empty.

Functions

func NewStaticPolicy

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

NewStaticPolicy returns a static io policy

Types

type StaticPolicy

type StaticPolicy struct {
	sync.Mutex
	// contains filtered or unexported fields
}

StaticPolicy is the static io policy

func (*StaticPolicy) Allocate

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

func (*StaticPolicy) AllocateForPod added in v0.5.8

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

func (*StaticPolicy) GetPodTopologyHints added in v0.5.8

func (p *StaticPolicy) GetPodTopologyHints(_ context.Context,
	req *pluginapi.PodResourceRequest,
) (resp *pluginapi.PodResourceHintsResponse, err error)

GetPodTopologyHints returns hints of corresponding resources

func (*StaticPolicy) GetResourcePluginOptions

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

GetResourcePluginOptions returns options to be communicated with Resource Manager

func (*StaticPolicy) GetResourcesAllocation

GetResourcesAllocation returns allocation results of corresponding resources

func (*StaticPolicy) GetTopologyAwareAllocatableResources

GetTopologyAwareAllocatableResources returns corresponding allocatable resources as topology aware format

func (*StaticPolicy) GetTopologyAwareResources

GetTopologyAwareResources returns allocation results of corresponding resources as topology aware format

func (*StaticPolicy) GetTopologyHints

func (p *StaticPolicy) GetTopologyHints(_ context.Context,
	req *pluginapi.ResourceRequest,
) (resp *pluginapi.ResourceHintsResponse, err error)

GetTopologyHints returns hints of corresponding resources

func (*StaticPolicy) Name

func (p *StaticPolicy) Name() string

Name returns the name of this plugin

func (*StaticPolicy) PreStartContainer

PreStartContainer is called, if indicated by resource plugin during registration 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 (*StaticPolicy) RemovePod

func (*StaticPolicy) ResourceName

func (p *StaticPolicy) ResourceName() string

ResourceName returns resource names managed by this plugin

func (*StaticPolicy) Start

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

Start starts this plugin

func (*StaticPolicy) Stop

func (p *StaticPolicy) Stop() error

Stop stops this plugin

Jump to

Keyboard shortcuts

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