config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Event event
View Source
var Log log
View Source
var Metric metric
View Source
var Publisher publisher
View Source
var Server = server{
	CORS: serverCors{

		AllowedMethods: []string{"GET", "HEAD", "POST", "OPTIONS"},
	},
}
View Source
var Version, BuildCommit, BuildDate string
View Source
var Worker worker

Functions

func Load

func Load(configFile string) error

Load configs from env or yaml and set it to respective keys

Types

type AckType

type AckType int
const (
	AckTypeAsync AckType = 0
	AckTypeSync  AckType = 1
)

type CfgRef added in v0.3.0

type CfgRef struct {
	Ref  any
	Meta reflect.StructField
}

func Walk added in v0.3.0

func Walk() []CfgRef

Walk returns a pointer to leaf nodes of the configuration tree along with it's struct metadata.

type ConfigError added in v0.3.0

type ConfigError struct {
	Env, Flag string
}

func (ConfigError) Error added in v0.3.0

func (e ConfigError) Error() string

Jump to

Keyboard shortcuts

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