Documentation
¶
Overview ¶
Package watcher provides file system monitoring functionality for the CLI Proxy API. It watches configuration files and authentication directories for changes, automatically reloading clients and configuration when files are modified. The package handles cross-platform file system events and supports hot-reloading.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthUpdate ¶
type AuthUpdate struct {
Action AuthUpdateAction
ID string
Auth *coreauth.Auth
}
AuthUpdate describes an incremental change to auth configuration.
type AuthUpdateAction ¶
type AuthUpdateAction string
AuthUpdateAction represents the type of change detected in auth sources.
const ( AuthUpdateActionAdd AuthUpdateAction = "add" AuthUpdateActionModify AuthUpdateAction = "modify" AuthUpdateActionDelete AuthUpdateAction = "delete" )
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher manages file watching for configuration and authentication files
func NewWatcher ¶
NewWatcher creates a new file watcher instance
func (*Watcher) SetAuthUpdateQueue ¶
func (w *Watcher) SetAuthUpdateQueue(queue chan<- AuthUpdate)
SetAuthUpdateQueue sets the queue used to emit auth updates.
func (*Watcher) SnapshotCoreAuths ¶
SnapshotCoreAuths converts current clients snapshot into core auth entries.