config

package
v0.0.0-...-b60b57f Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	EncodingTypeConsole = "console"
	EncodingTypeJson    = "json"
)

Variables

This section is empty.

Functions

func CreateLogger

func CreateLogger(logLevel Level, encoding string, fields ...zap.Field) (*zap.Logger, error)

Types

type Configuration

type Configuration struct {
	Name    string
	HTTP    HTTP
	Metrics Metrics
	Logger  Logger
}

func Read

func Read(prefix, configPath string) (Configuration, error)

type HTTP

type HTTP struct {
	Port        int
	Profiling   Profiling
	HealthCheck HealthCheck
}

type HealthCheck

type HealthCheck struct {
	Path string
}

type Level

type Level = zapcore.Level

type Logger

type Logger struct {
	Level    zapcore.Level
	Encoding string
}

type Metrics

type Metrics struct {
	Enabled   bool
	Path      string
	Namespace string
}

type Profiling

type Profiling struct {
	Enabled bool
}

Jump to

Keyboard shortcuts

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