service

package
v0.40.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReloadManager

type ReloadManager struct {
	// contains filtered or unexported fields
}

ReloadManager coordinates configuration reload across the application.

func NewReloadManager

func NewReloadManager() *ReloadManager

NewReloadManager creates a new reload manager.

func (*ReloadManager) Subscribe

func (r *ReloadManager) Subscribe() chan struct{}

Subscribe registers a channel to receive reload notifications. Returns the reload channel that will receive signals (not be closed).

func (*ReloadManager) TriggerReload

func (r *ReloadManager) TriggerReload()

TriggerReload initiates a configuration reload. It clears the template cache and sends signals to all subscribers.

type ShutdownManager

type ShutdownManager struct {
	// contains filtered or unexported fields
}

ShutdownManager coordinates graceful shutdown of confd services.

func NewShutdownManager

func NewShutdownManager(timeout time.Duration, metricsServer *http.Server, storeClient backends.StoreClient, inFlightCmds *sync.WaitGroup) *ShutdownManager

NewShutdownManager creates a new shutdown manager.

func (*ShutdownManager) Shutdown

func (s *ShutdownManager) Shutdown(ctx context.Context) error

Shutdown performs graceful shutdown in three phases: 1. Wait for in-flight commands to complete (with timeout) 2. Shutdown metrics server gracefully 3. Close backend connections

type SystemdNotifier

type SystemdNotifier struct {
	// contains filtered or unexported fields
}

SystemdNotifier handles systemd notification protocol.

func NewSystemdNotifier

func NewSystemdNotifier(enabled bool, watchdogInterval time.Duration) *SystemdNotifier

NewSystemdNotifier creates a new systemd notifier.

func (*SystemdNotifier) NotifyReady

func (s *SystemdNotifier) NotifyReady() error

NotifyReady sends READY=1 to systemd.

func (*SystemdNotifier) NotifyReloading

func (s *SystemdNotifier) NotifyReloading() error

NotifyReloading sends RELOADING=1 to systemd.

func (*SystemdNotifier) NotifyStopping

func (s *SystemdNotifier) NotifyStopping() error

NotifyStopping sends STOPPING=1 to systemd.

func (*SystemdNotifier) StartWatchdog

func (s *SystemdNotifier) StartWatchdog(ctx context.Context)

StartWatchdog starts the systemd watchdog heartbeat goroutine. It pings systemd at the specified interval until the context is cancelled.

Jump to

Keyboard shortcuts

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