Documentation ¶
Index ¶
- Constants
- type AdvisorPluginInitFunc
- type Component
- func InitEvictionManager(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
- type SysAdvisorAgent
Constants ¶
const (
EvictionManagerAgent = "katalyst-agent-eviction"
)
const (
QoSSysAdvisor = "katalyst-agent-advisor"
)
const (
ReporterManagerAgent = "katalyst-agent-reporter"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvisorPluginInitFunc ¶
type AdvisorPluginInitFunc func(conf *config.Configuration, extraConf interface{}, emitterPool metricspool.MetricsEmitterPool, metaServer *metaserver.MetaServer, metaCache *metacache.MetaCache) (pkgplugin.SysAdvisorPlugin, error)
AdvisorPluginInitFunc is used to initialize a particular inter SysAdvisor plugin.
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 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)
type SysAdvisorAgent ¶
type SysAdvisorAgent struct {
// contains filtered or unexported fields
}
SysAdvisorAgent for sysadvisor
func NewSysAdvisorAgent ¶
func NewSysAdvisorAgent(agentCtx *GenericContext, conf *config.Configuration, extraConf interface{}) (*SysAdvisorAgent, error)
NewSysAdvisorAgent initializes the sysadvisor agent logic.
func (*SysAdvisorAgent) Run ¶
func (m *SysAdvisorAgent) Run(ctx context.Context)
Run starts sysadvisor agent