configwatcher

package
v0.0.0-...-221c3f5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package configwatcher provides a shared config file watcher using fsnotify.

Index

Constants

View Source
const (
	// FallbackInterval is used as a safety net in case fsnotify misses events
	FallbackInterval = 5 * time.Minute
)

Variables

This section is empty.

Functions

func Watch

func Watch(ctx context.Context, name string, onConfigChange func())

Watch monitors the collector config file for changes and calls onConfigChange when the file is modified. It also calls onConfigChange periodically as a fallback. This function blocks until ctx is cancelled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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