agent

package
v18.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateLogLevel added in v18.1.0

func ValidateLogLevel(val string) error

Types

type Factory

type Factory struct {
	LogLevel      *slog.LevelVar
	GRPCLogLevel  *slog.LevelVar
	Gatherer      prometheus.Gatherer
	Registerer    prometheus.Registerer
	ListenNetwork string
	ListenAddress string
	CertFile      string
	KeyFile       string
}

func (*Factory) GetListenerFn added in v18.1.0

func (f *Factory) GetListenerFn() (func() (net.Listener, error), error)

func (*Factory) IsProducingLeaderModules

func (f *Factory) IsProducingLeaderModules() bool

func (*Factory) Name

func (f *Factory) Name() string

type Module added in v18.1.0

type Module[CM any] struct {
	Log                                     *slog.Logger
	LogLevel                                *slog.LevelVar
	GRPCLogLevel                            *slog.LevelVar
	API                                     modshared.API
	Gatherer                                prometheus.Gatherer
	Registerer                              prometheus.Registerer
	Listener                                func() (net.Listener, error)
	ServerName                              string
	CfgAccessor                             func(CM) *ModuleCfg
	DefaultAndValidateConfigurationCallback func(CM) error
}

func (*Module[CM]) DefaultAndValidateConfiguration added in v18.1.0

func (m *Module[CM]) DefaultAndValidateConfiguration(cm CM) error

func (*Module[CM]) Name added in v18.1.0

func (m *Module[CM]) Name() string

func (*Module[CM]) Run added in v18.1.0

func (m *Module[CM]) Run(ctx context.Context, cmCh <-chan CM) error

type ModuleCfg added in v18.1.0

type ModuleCfg struct {
	LogLevel     string
	GRPCLogLevel string
}

Jump to

Keyboard shortcuts

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