config

package
v0.0.0-...-548a151 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PgDsn          = "pg-dsn"
	JaegerEndpoint = "jaeger-endpoint"
	ServiceName    = "service-name"
)

Variables

View Source
var (
	ErrConfigNotFoundByKey = func(key string) error {
		return fmt.Errorf("config not found by key = %q", key)
	}
)
View Source
var Tracer opentracing.Tracer

Functions

func GetValue

func GetValue(key string) (string, error)

func Init

func Init() error

func InitTestConfigs

func InitTestConfigs() error

func New

func New() (tracer opentracing.Tracer, closer io.Closer, err error)

New for current service

func NewJaegerTracer

func NewJaegerTracer() (tracer opentracing.Tracer, closer io.Closer, err error)

NewJaegerTracer for current service

Types

type Config

type Config struct {
	Secrets struct {
		PgDsn          string `yaml:"pg-dsn"`
		JaegerEndpoint string `yaml:"jaeger-endpoint"`
		ServiceName    string `yaml:"service-name"`
	} `yaml:"secrets"`
}

Jump to

Keyboard shortcuts

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