periodicalhandler

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 RegisterPeriodicalHandler

func RegisterPeriodicalHandler(groupName, handlerName string, handler Handler, interval time.Duration) (err error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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