config

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 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 {
	Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service

	Service Service `yaml:"-"`

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

	Nats Nats `ociConfig:"nats"`

	Context context.Context `yaml:"-"`
}

Config combines all available configuration parts.

type Debug

type Debug struct {
	Addr   string `` /* 141-byte string literal not displayed */
	Token  string `yaml:"token" env:"NATS_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint."`
	Pprof  bool   `yaml:"pprof" env:"NATS_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling."`
	Zpages bool   `yaml:"zpages" env:"NATS_DEBUG_ZPAGES" desc:"Enables zpages, which can be used for collecting and viewing in-memory traces."`
}

Debug defines the available debug configuration.

type Log

type Log struct {
	Level  string `` /* 171-byte string literal not displayed */
	Pretty bool   `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;NATS_LOG_PRETTY" desc:"Activates pretty log output."`
	Color  bool   `mapstructure:"color" env:"OCIS_LOG_COLOR;NATS_LOG_COLOR" desc:"Activates colorized log output."`
	File   string `mapstructure:"file" env:"OCIS_LOG_FILE;NATS_LOG_FILE" desc:"The path to the log file. Activates logging to this file if set."`
}

Log defines the available log configuration.

type Nats

type Nats struct {
	Host                    string `yaml:"host" env:"NATS_NATS_HOST" desc:"Bind address."`
	Port                    int    `yaml:"port" env:"NATS_NATS_PORT" desc:"Bind port."`
	ClusterID               string `yaml:"clusterid" env:"NATS_NATS_CLUSTER_ID" desc:"ID of the NATS cluster."`
	StoreDir                string `` /* 201-byte string literal not displayed */
	TLSCert                 string `` /* 126-byte string literal not displayed */
	TLSKey                  string `yaml:"tls_key" env:"NATS_TLS_KEY" desc:"Path/File name for the TLS certificate key (in PEM format) for the NATS listener."`
	TLSSkipVerifyClientCert bool   `` /* 192-byte string literal not displayed */
	EnableTLS               bool   `` /* 224-byte string literal not displayed */
}

Nats is the nats config

type Service

type Service struct {
	Name string `yaml:"-"`
}

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