sources

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ProjectEnvKey recognize env of project, dev, release, production
	ProjectEnvKey = "PROJECT_ENV"
	//ProjectPrefix project env key prefix
	ProjectPrefix = "PROJECT_PREFIX"
	//DefaultPrefix  default config file name prefix
	DefaultPrefix = "config"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyValue

type KeyValue struct {
	Key    string
	Value  []byte
	Format string
}

KeyValue is config key value.

type Source

type Source interface {
	Load() ([]*KeyValue, error)
	Watch() (Watcher, error)
}

Source is config source.

type Watcher

type Watcher interface {
	Next() ([]*KeyValue, error)
	Stop() error
}

Watcher watches a source for changes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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