Documentation ¶
Index ¶
- func NewPeriodicalHandlerManager(agentCtx *agent.GenericContext, coreConf *config.Configuration, ...) (bool, agent.Component, error)
- func ReadyToStartHandlersByGroup(groupName string)
- func RegisterPeriodicalHandler(groupName, handlerName string, handler Handler, interval time.Duration) (err error)
- func RegisterPeriodicalHandlerWithHealthz(handlerName string, initState general.HealthzCheckState, groupName string, ...) (err error)
- func StopHandlersByGroup(groupName string)
- type Handler
- type HandlerCtx
- type PeriodicalHandlerManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPeriodicalHandlerManager ¶
func NewPeriodicalHandlerManager(agentCtx *agent.GenericContext, coreConf *config.Configuration, extraConf interface{}, agentName string, ) (bool, agent.Component, error)
func ReadyToStartHandlersByGroup ¶
func ReadyToStartHandlersByGroup(groupName string)
func RegisterPeriodicalHandlerWithHealthz ¶ added in v0.4.1
func StopHandlersByGroup ¶
func StopHandlersByGroup(groupName string)
Types ¶
type Handler ¶
type Handler func(coreConf *config.Configuration, extraConf interface{}, dynamicConf *dynamicconfig.DynamicAgentConfiguration, emitter metrics.MetricEmitter, metaServer *metaserver.MetaServer)
type HandlerCtx ¶
type HandlerCtx struct {
// contains filtered or unexported fields
}
type PeriodicalHandlerManager ¶
type PeriodicalHandlerManager struct {
// contains filtered or unexported fields
}
PeriodicalHandlerManager works as a general framework to run periodical jobs; you can register those jobs and mark them as started or stopped, and the manager will periodically check and run/cancel according to the job expected status.
func (*PeriodicalHandlerManager) Run ¶
func (phm *PeriodicalHandlerManager) Run(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.