config

package
v0.0.0-...-9ca37e5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 0 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 {
	// Address must specifies the address:[port] combination
	// for the API server to listen on
	ServerAddress string `json:"server-addr"`

	// MetricsServerAddress specifies the address:[port] combination
	// for the metrics server to listen on
	MetricsServerAddress string `json:"metrics-server-addr"`

	// TLS specifies the TLS encryption configuration,
	// which is disabled if TLS is nil
	TLS *TLSConfig `json:"tls"`

	// Log specifies the logging configuration.
	// Logs will be redirected to std.out and std.err respectively
	// if Log is nil
	Log *LogConfig `json:"log"`
}

Config defines the configuration of the API server instance

type LogConfig

type LogConfig struct {
	// DebugEnabled toggles the debug log, which is disabled when false
	DebugEnabled bool `json:"debug"`

	// ErrorLogFilePath specifies the error log file path.
	// If it's empty then the log is redirected to std.err
	ErrorLogFilePath string `json:"error-out"`

	// DebugLogFilePath specifies the error log file path.
	// If it's empty then the log is redirected to std.out
	DebugLogFilePath string `json:"debug-out"`
}

LogConfig defines the logging configuration

type TLSConfig

type TLSConfig struct {
	// FullChainCertFilePath specifies the path
	// to the full-chain certificate file
	FullChainCertFilePath string `json:"cert"`

	// KeyFilePath specifies the path to the certificate's private key file
	KeyFilePath string `json:"key"`
}

TLSConfig defines the TLS configuration

Jump to

Keyboard shortcuts

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