config

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(conf any, sources ...Src) error

Types

type Common

type Common struct {
	Log      *log.Config      `yaml:"log,omitempty"`
	Trace    *trace.Config    `yaml:"trace,omitempty"`
	Metrics  *metrics.Config  `yaml:"metrics,omitempty"`
	Redis    *Redis           `yaml:"redis,omitempty"`
	Features *features.Config `yaml:"features,omitempty"`
}

func (*Common) Validate

func (c *Common) Validate() error

type Redis

type Redis struct {
	// Deprecated: Address is deprecated: use Addresses
	// If Addresses set, Address will be ignored
	Address   string        `yaml:"address"`
	Addresses []string      `yaml:"addresses"`
	Sentinel  RedisSentinel `yaml:"sentinel"`
	User      string        `yaml:"user"`
	Password  string        `yaml:"password"`
	TLS       TLS           `yaml:"tls"`
	MetaDB    int           `yaml:"metaDB"`
	QueueDB   int           `yaml:"queueDB"`
	LockDB    int           `yaml:"lockDB"`
	ConfigDB  int           `yaml:"configDB"`
}

func (*Redis) GetAddresses added in v0.5.10

func (r *Redis) GetAddresses() []string

type RedisSentinel added in v0.5.9

type RedisSentinel struct {
	MasterName string `yaml:"masterName"`
	Password   string `yaml:"password"`
	User       string `yaml:"user"`
}

type Src

type Src interface {
	// contains filtered or unexported methods
}

func Path

func Path(path string) Src

func Reader

func Reader(reader io.Reader, name string) Src

type TLS added in v0.5.9

type TLS struct {
	Enabled  bool `yaml:"enabled"`
	Insecure bool `yaml:"insecure"`
}

Jump to

Keyboard shortcuts

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