config

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 2 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 {
	*shared.Commons

	Service Service

	Log   *Log  `ocisConfig:"log"`
	Debug Debug `ocisConfig:"debug"`

	Nats Nats `ociConfig:"nats"`

	Context context.Context
}

Config combines all available configuration parts.

func DefaultConfig

func DefaultConfig() *Config

type Debug

type Debug struct {
	Addr   string `ocisConfig:"addr" env:"NATS_DEBUG_ADDR"`
	Token  string `ocisConfig:"token" env:"NATS_DEBUG_TOKEN"`
	Pprof  bool   `ocisConfig:"pprof" env:"NATS_DEBUG_PPROF"`
	Zpages bool   `ocisConfig:"zpages" env:"NATS_DEBUG_ZPAGES"`
}

Debug defines the available debug configuration.

type Log

type Log struct {
	Level  string `mapstructure:"level" env:"OCIS_LOG_LEVEL;NATS_LOG_LEVEL"`
	Pretty bool   `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;NATS_LOG_PRETTY"`
	Color  bool   `mapstructure:"color" env:"OCIS_LOG_COLOR;NATS_LOG_COLOR"`
	File   string `mapstructure:"file" env:"OCIS_LOG_FILE;NATS_LOG_FILE"`
}

Log defines the available log configuration.

type Nats

type Nats struct {
	Host string
	Port int
}

Nats is the nats config

type Service

type Service struct {
	Name string
}

Service defines the available service configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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