factory

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOutputNotifiers

func CreateOutputNotifiers(allConfig config.AllConfigs) ([]executors.OutputNotifier, error)

CreateOutputNotifiers will create the output notifiers based on the provided configuration

func CreateStatusHandler

func CreateStatusHandler(
	generalConfig config.GeneralConfigs,
	notifiersHandler OutputNotifiersHandler,
) (executors.StatusHandler, io.Closer, error)

CreateStatusHandler will create an instance of type executors.StatusHandler and an instance of io.Closer (the polling component)

func NewBLSKeysFilter added in v1.0.3

func NewBLSKeysFilter(cfg config.AlarmSnoozeConfig) (executors.BLSKeysFilter, error)

NewBLSKeysFilter creates a new instance of type BLSKeysFilter

Types

type FileLoggingHandler

type FileLoggingHandler interface {
	ChangeFileLifeSpan(newDuration time.Duration, newSizeInMB uint64) error
	Close() error
	IsInterfaceNil() bool
}

FileLoggingHandler will handle log file rotation

type Monitor

type Monitor interface {
	Close() error
	IsInterfaceNil() bool
}

Monitor defines the monitor interface used in polling mechanism to check some conditions

func NewBLSKeysMonitor

func NewBLSKeysMonitor(
	cfg config.BLSKeysMonitorConfig,
	snoozeConfig config.AlarmSnoozeConfig,
	notifiersHandler OutputNotifiersHandler,
	statusHandler executors.StatusHandler,
) (Monitor, error)

NewBLSKeysMonitor will create a BLS keys monitor based on the configs & other internal components

type OutputNotifiersHandler

type OutputNotifiersHandler interface {
	NotifyWithRetry(caller string, messages ...core.OutputMessage) error
	IsInterfaceNil() bool
}

OutputNotifiersHandler defines the behavior of a component that is able to notify all notifiers

Jump to

Keyboard shortcuts

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