Documentation ¶
Index ¶
- func BeginWatchConfig(cb func())
- func BeginWatchConfigWithContext(cb func(), ctx *Context)
- func LoadConfigFile(filename string) error
- func LoadConfigFileWithContext(filename string, ctx *Context) error
- func MapToStruct[T any]() (*T, error)
- func MapToStructWithContext[T any](ctx *Context) (*T, error)
- type Context
- type SafeConf
- type TimeoutBasedMerger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginWatchConfig ¶
func BeginWatchConfig(cb func())
func BeginWatchConfigWithContext ¶
func BeginWatchConfigWithContext(cb func(), ctx *Context)
func LoadConfigFile ¶
func MapToStruct ¶
func MapToStructWithContext ¶
Types ¶
type SafeConf ¶
type SafeConf[T any] struct { // contains filtered or unexported fields }
func NewSafeConf ¶
type TimeoutBasedMerger ¶
type TimeoutBasedMerger[T any] struct { To time.Duration // contains filtered or unexported fields }
func NewTimeoutBasedMerger ¶
func NewTimeoutBasedMerger[T any]() *TimeoutBasedMerger[T]
func NewTimeoutBasedMergerWithTimeout ¶
func NewTimeoutBasedMergerWithTimeout[T any](timeout time.Duration) *TimeoutBasedMerger[T]
func (*TimeoutBasedMerger[T]) Start ¶
func (merger *TimeoutBasedMerger[T]) Start(cb func([]*T)) func(T)
func (*TimeoutBasedMerger[T]) Stop ¶
func (merger *TimeoutBasedMerger[T]) Stop()
Click to show internal directories.
Click to hide internal directories.