Documentation ¶
Index ¶
- Constants
- type Component
- func InitEvictionManager(agentCtx *GenericContext, conf *config.Configuration, _ interface{}, _ string) (bool, Component, error)
- func InitORM(agentCtx *GenericContext, conf *config.Configuration, _ interface{}, _ string) (bool, Component, error)
- func InitReporterManager(agentCtx *GenericContext, conf *config.Configuration, _ interface{}, _ string) (bool, Component, error)
- func InitSysAdvisor(agentCtx *GenericContext, conf *config.Configuration, extraConf interface{}, ...) (bool, Component, error)
- type ComponentStub
- type GenericContext
- type InitFunc
- type PluginWrapper
Constants ¶
const (
EvictionManagerAgent = "katalyst-agent-eviction"
)
const (
ORMAgent = orm.ORMAgentName
)
const QoSSysAdvisor = "katalyst-agent-advisor"
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 NewGenericContext ¶
func NewGenericContext(base *katalystbase.GenericContext, conf *katalystconfig.Configuration) (*GenericContext, error)
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)