Documentation ¶
Overview ¶
Package reload provides configuration reloading capabilities.
Index ¶
- func FireConfigUpdate[T any](mgr event.Manager, config *T, prevConfig *T)
- func Map[C1, C2 event.Event](mgr event.Manager, forwarder func(*C1) *C2) func()
- func Subscribe[T any](mgr event.Manager, handler func(*ConfigUpdateEvent[T])) func()
- func Watch(ctx context.Context, path string, cb func() error) error
- type ConfigUpdateEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FireConfigUpdate ¶
FireConfigUpdate fires the config update event.
Types ¶
type ConfigUpdateEvent ¶
type ConfigUpdateEvent[T any] struct { // Config is the new config. Config *T // PrevConfig is the previous config. PrevConfig *T }
ConfigUpdateEvent is fired when the config is reloaded.
Click to show internal directories.
Click to hide internal directories.