config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Core  CoreConfig
	Extra map[string]any
}

func Load

func Load(opts ...Option) (*Config, error)

type CoreConfig

type CoreConfig struct {
	Service Service `mapstructure:"service"`
}

type Option

type Option func(v *viper.Viper, cfg *Config) error

Option is a functional extension option

func WithExtension

func WithExtension[T any](key string, target *T) Option

type Service

type Service struct {
	Name      string           `mapstructure:"name"`
	Logger    logger.Config    `mapstructure:"logger"`
	Tracer    tracing.Config   `mapstructure:"tracer"`
	Timestamp timestamp.Config `mapstructure:"timestamp"`
}

Jump to

Keyboard shortcuts

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