periodicalhandler

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 3

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 RegisterPeriodicalHandlerWithHealthz added in v0.4.1

func RegisterPeriodicalHandlerWithHealthz(handlerName string, initState general.HealthzCheckState, groupName string,
	handler Handler, interval time.Duration, tolerationTimes int64,
) (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