Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackendMonitoringService ¶
type BackendMonitoringService struct {
// contains filtered or unexported fields
}
BackendMonitoringService provides functionality to monitor backend services at specified intervals.
func NewBackendMonitoringService ¶
func NewBackendMonitoringService(interval time.Duration, cfgProvider configfx.Provider, logger *slog.Logger) *BackendMonitoringService
NewBackendMonitoringService initializes a new BackendMonitoringService with the provided monitoring interval.
func NewDefaultBackendMonitoringService ¶
func NewDefaultBackendMonitoringService(cfgProvider configfx.Provider, logger *slog.Logger) *BackendMonitoringService
NewDefaultBackendMonitoringService creates a BackendMonitoringService with a default delay for backend monitoring.
func (*BackendMonitoringService) Restart ¶
func (s *BackendMonitoringService) Restart(ctx context.Context) error
Restart restarts the backend monitoring service by stopping and then starting its monitoring loop.
type BruteForceSyncService ¶
type BruteForceSyncService struct {
// contains filtered or unexported fields
}
BruteForceSyncService is a background service that listens for global brute-force block events via Redis Pub/Sub and updates the local L1 micro-cache accordingly.
func NewBruteForceSyncService ¶
func NewBruteForceSyncService(cfgProvider configfx.Provider, logger *slog.Logger, redisClient redifx.Client) *BruteForceSyncService
NewBruteForceSyncService initializes and returns a BruteForceSyncService.
type ConnMgrService ¶
type ConnMgrService struct {
// contains filtered or unexported fields
}
ConnMgrService manages the lifecycle of connection monitoring with configurable intervals and context handling.
func NewConnMgrService ¶
func NewConnMgrService(interval time.Duration, startGenericConnections func(context.Context), cfgProvider configfx.Provider, logger *slog.Logger) *ConnMgrService
NewConnMgrService initializes and returns a new instance of ConnMgrService with the given interval and start function.
func NewDefaultConnMgrService ¶
func NewDefaultConnMgrService(cfgProvider configfx.Provider, logger *slog.Logger) *ConnMgrService
NewDefaultConnMgrService creates a ConnMgrService with default settings for connection monitoring and context handling.
type StatsService ¶
type StatsService struct {
// contains filtered or unexported fields
}
StatsService is a service that manages periodic tasks and CPU usage monitoring using a defined interval and hooks.
func NewDefaultStatsService ¶
func NewDefaultStatsService(cfgProvider configfx.Provider, logger *slog.Logger, redisClient redifx.Client) *StatsService
NewDefaultStatsService initializes and returns a StatsService with default settings for statistical monitoring tasks.
func NewStatsService ¶
func NewStatsService(interval time.Duration, startMeasureCPU func(context.Context), onTick func(context.Context)) *StatsService
NewStatsService initializes a StatsService with a specified interval, CPU measurement function, and tick callback.