Help us shape the future of Go! Take the 2026 Go Developer Survey

service

package
v0.41.3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 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) *ShutdownManager

NewShutdownManager creates a new shutdown manager.

func (*ShutdownManager) Shutdown

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

Shutdown performs graceful shutdown in two phases: 1. Shutdown metrics server gracefully 2. Close backend connections

In-flight check/reload commands do not need explicit tracking here: all three processor types (interval, watch, batch-watch) complete any in-progress process() call before closing doneChan, so by the time Shutdown is called the processor has already drained.

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