source

package
v4.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source interface {
	Read() (map[string]map[string]any, error)
	Write(data map[string]any, host string) error
}

Source is the source from which config is loaded.

func NewFileSource

func NewFileSource(path string) (Source, error)

NewFileSource returns a new fileSource.

func NewMemorySource

func NewMemorySource() Source

NewMemorySource returns a new memorySource.

type SourceType

type SourceType int

SourceType how to store variable

const (
	// MemorySource store variable in memory
	MemorySource SourceType = iota
	// FileSource store variable in file
	FileSource SourceType = iota
)

Jump to

Keyboard shortcuts

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