config

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureTempDirEnv added in v1.3.0

func EnsureTempDirEnv()

func InjectEnv

func InjectEnv(config map[interface{}]interface{})

func InjectEnvSlice

func InjectEnvSlice(slice []interface{})

func ToJsonCompatibleMap

func ToJsonCompatibleMap(m map[any]any) (map[string]any, error)

Types

type Configurable

type Configurable interface {
	Configure(sub Subconfig) error
}

type Listener added in v1.3.0

type Listener[T any] interface {
	NotifyChanged(init bool, old T, new T)
}

type ListenerFunc added in v1.3.0

type ListenerFunc[T any] func(init bool, old T, new T)

func (ListenerFunc[T]) NotifyChanged added in v1.3.0

func (f ListenerFunc[T]) NotifyChanged(init bool, old T, new T)

type Subconfig

type Subconfig interface {
	LoadConfig(cfgmap map[interface{}]interface{}) error
}

type Value added in v1.3.0

type Value[T comparable] struct {
	// contains filtered or unexported fields
}

func NewConfigValue added in v1.3.0

func NewConfigValue[T comparable]() *Value[T]

func (*Value[T]) AddListener added in v1.3.0

func (self *Value[T]) AddListener(listener Listener[T])

func (*Value[T]) GetInitNotifyChannel added in v1.3.0

func (self *Value[T]) GetInitNotifyChannel() <-chan struct{}

func (*Value[T]) Load added in v1.3.0

func (self *Value[T]) Load() T

func (*Value[T]) RemoveListener added in v1.3.0

func (self *Value[T]) RemoveListener(listener Listener[T])

func (*Value[T]) Store added in v1.3.0

func (self *Value[T]) Store(value T)

Jump to

Keyboard shortcuts

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