settings

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRuntimeSetting

func GetRuntimeSetting(setting string) (interface{}, error)

GetRuntimeSetting returns the value of a runtime configurable setting

func InitRuntimeSettings

func InitRuntimeSettings() error

InitRuntimeSettings builds the map of runtime settings configurable at runtime.

func RuntimeSettings

func RuntimeSettings() map[string]RuntimeSetting

RuntimeSettings returns all runtime configurable settings

func SetRuntimeSetting

func SetRuntimeSetting(setting string, value interface{}) error

SetRuntimeSetting changes the value of a runtime configurable setting

Types

type RuntimeSetting

type RuntimeSetting interface {
	Get() (interface{}, error)
	Set(v interface{}) error
	Name() string
	Description() string
	Hidden() bool
}

RuntimeSetting represents a setting that can be changed and read at runtime.

type RuntimeSettingResponse

type RuntimeSettingResponse struct {
	Description string
	Hidden      bool
}

RuntimeSettingResponse is used to communicate settings config

type SettingNotFoundError

type SettingNotFoundError struct {
	// contains filtered or unexported fields
}

SettingNotFoundError is used to warn about non existing/not registered runtime setting

func (*SettingNotFoundError) Error

func (e *SettingNotFoundError) Error() string

Jump to

Keyboard shortcuts

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