configure

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagDefault = "default"
	TagComment = "comment"

	ConfigPrefix = "config"
)

Variables

This section is empty.

Functions

func Init

func Init()

Types

type ConfigItem added in v1.1.0

type ConfigItem struct {
	Type    string `json:"type"`
	Schema  string `json:"schema"`
	Value   string `json:"value"`
	Comment string `json:"comment"`
}

func (ConfigItem) String added in v1.1.0

func (c ConfigItem) String() string

type ConfigItems added in v1.1.0

type ConfigItems map[string]*ConfigItem

func (ConfigItems) Add added in v1.1.0

func (c ConfigItems) Add(items ConfigItems)

func (ConfigItems) KVs added in v1.1.0

func (c ConfigItems) KVs(path string) map[string]string

type Configure added in v1.1.0

type Configure struct{}

func (*Configure) Register added in v1.1.0

func (m *Configure) Register(component string, v interface{}, opts ...configure.Option) error

Register the configuration pointer.

type Debug added in v1.1.0

type Debug struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Debug) Close added in v1.1.0

func (m *Debug) Close()

Close the provider connection.

func (*Debug) Get added in v1.1.0

func (m *Debug) Get(key string, dir bool) (*configure.KVPairs, error)

Get the value of the specified key or directory.

func (*Debug) Set added in v1.1.0

func (m *Debug) Set(key, value string) error

Set value for the specified key.

func (*Debug) Type added in v1.1.0

func (m *Debug) Type() string

Type returns the backend provider type.

func (*Debug) Watch added in v1.1.0

func (m *Debug) Watch(key string, _ uint64, dir bool) (configure.EventChan, error)

Watch for changes of the specified key or directory.

type InvalidUnmarshalError added in v1.1.0

type InvalidUnmarshalError struct {
	Type reflect.Type
}

An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. (The argument to Unmarshal must be a non-nil pointer.)

func (*InvalidUnmarshalError) Error added in v1.1.0

func (e *InvalidUnmarshalError) Error() string

Jump to

Keyboard shortcuts

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