Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackFunc ¶ added in v1.4.0
type CallbackFunc[T any] func(oldConfig, curConfig T)
CallbackFunc is a func called on config changed
type ConfigReloader ¶ added in v1.4.0
type ConfigReloader[T any] struct { // contains filtered or unexported fields }
ConfigReloader - the config reloader service
func (*ConfigReloader[T]) Config ¶ added in v1.4.0
func (s *ConfigReloader[T]) Config() T
Config returns current config should not be used in callback (deadlock)
func (*ConfigReloader[T]) ForceReload ¶ added in v1.4.0
func (s *ConfigReloader[T]) ForceReload() error
ForceReload ...
func (*ConfigReloader[T]) ReloadTime ¶ added in v1.4.0
func (s *ConfigReloader[T]) ReloadTime() time.Time
ReloadTime returns last time config was changed
func (*ConfigReloader[T]) Start ¶ added in v1.4.0
func (s *ConfigReloader[T]) Start(ctx context.Context) error
Start ...
func (*ConfigReloader[T]) Subscribe ¶ added in v1.4.0
func (s *ConfigReloader[T]) Subscribe(cb CallbackFunc[T]) error
Click to show internal directories.
Click to hide internal directories.