agent

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 23 Imported by: 8

Documentation

Index

Constants

View Source
const (
	EvictionManagerAgent = "katalyst-agent-eviction"
)
View Source
const (
	ORMAgent = orm.ORMAgentName
)
View Source
const QoSSysAdvisor = "katalyst-agent-advisor"
View Source
const (
	ReporterManagerAgent = "katalyst-agent-reporter"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component interface {
	// Run performs those running logic for each agent component
	// Run works in a blocking way, and all Component should wait
	// until the given ctx is done
	Run(ctx context.Context)
}

Component is used as a common abstraction for all agent components.

func InitEvictionManager

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

func InitORM added in v0.4.0

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

func InitReporterManager

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

func InitSysAdvisor

func InitSysAdvisor(agentCtx *GenericContext, conf *config.Configuration, extraConf interface{}, _ string) (bool, Component, error)

type ComponentStub

type ComponentStub struct{}

ComponentStub is used as testing implementation for agent Component.

func (ComponentStub) Run

func (c ComponentStub) Run(_ context.Context)

type GenericContext

type GenericContext struct {
	*katalystbase.GenericContext

	// those are shared among other agent components
	*metaserver.MetaServer
	pluginmanager.PluginManager
}

GenericContext is used by katalyst-agent, and it's constructed based on unified katalyst-genetic context.

func (*GenericContext) Run

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

type InitFunc

type InitFunc func(agentCtx *GenericContext, conf *katalystconfig.Configuration,
	extraConf interface{}, agentName string) (bool, Component, error)

InitFunc is used to construct the framework of agent component; all components should be initialized before any component starts to run, to make sure the dependencies are well handled before the running logic starts. the returned parameters are consisted of several parts - bool indicates whether the agent component needs to be started by calling Run function - Component indicates the corresponding component if starting is needed - error indicates whether the agent is succeeded to be initialized

type PluginWrapper

type PluginWrapper struct {
	skeleton.GenericPlugin
}

func (*PluginWrapper) Run

func (p *PluginWrapper) Run(ctx context.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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