Documentation ¶
Overview ¶
Package configuration is a small package for handling configuration
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Backend string `mapstructure:"backend" desc:"destination host" default:"http://127.0.0.1"` ClientCAPoolPath string `mapstructure:"clients-ca" desc:"Path the CAs used to verify client certificates" required:"true"` ListenAddress string `mapstructure:"listen" desc:"Listening address" default:":443"` ServerCertificateKeyPass string `mapstructure:"cert-key-pass" desc:"Password for the server certificate key" ` ServerCertificateKeyPath string `mapstructure:"cert-key" desc:"Path to the server certificate key" required:"true"` ServerCertificatePath string `mapstructure:"cert" desc:"Path to the server certificate" required:"true"` Mode string `mapstructure:"mode" desc:"Proxy mode" default:"http" allowed:"tcp,http"` LogFormat string `mapstructure:"log-format" desc:"Log format" default:"console"` LogLevel string `mapstructure:"log-level" desc:"Log level" default:"info"` ClientCAPool *x509.CertPool ServerCertificates []tls.Certificate }
Configuration hold the service configuration.
func NewConfiguration ¶
func NewConfiguration() *Configuration
NewConfiguration returns a new configuration.
func (*Configuration) Prefix ¶
func (c *Configuration) Prefix() string
Prefix returns the configuration prefix.
func (*Configuration) PrintVersion ¶
func (c *Configuration) PrintVersion()
PrintVersion prints the current version.
Click to show internal directories.
Click to hide internal directories.