flags

package
v2.0.0-rc1.0...-2596299 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FlagProfilingInsecurePort sets the port that Kanali will listen on for incoming requests
	FlagProfilingInsecurePort = Flag{
		Long:  "profiling.insecure_port",
		Short: "",
		Value: 9090,
		Usage: "Sets the port that Kanali will listen on for incoming requests.",
	}
	// FlagProfilingInsecureBindAddress specifies the network address that Kanali will listen on for incoming requests
	FlagProfilingInsecureBindAddress = Flag{
		Long:  "profiling.insecure_bind_address",
		Short: "",
		Value: "0.0.0.0",
		Usage: "Network address that Kanali will listen on for incoming requests.",
	}
)
View Source
var (
	// FlagPrometheusServerSecurePort sets the port that Kanali will listen on for incoming requests
	FlagPrometheusServerSecurePort = Flag{
		Long:  "prometheus.secure_port",
		Short: "",
		Value: 0,
		Usage: "Sets the port that Kanali will listen on for incoming requests.",
	}
	// FlagPrometheusServerInsecurePort sets the port that Kanali will listen on for incoming requests
	FlagPrometheusServerInsecurePort = Flag{
		Long:  "prometheus.insecure_port",
		Short: "",
		Value: 9000,
		Usage: "Sets the port that Kanali will listen on for incoming requests.",
	}
	// FlagPrometheusServerInsecureBindAddress specifies the network address that Kanali will listen on for incoming requests
	FlagPrometheusServerInsecureBindAddress = Flag{
		Long:  "prometheus.insecure_bind_address",
		Short: "",
		Value: "0.0.0.0",
		Usage: "Network address that Kanali will listen on for incoming requests.",
	}
	// FlagPrometheusServerSecureBindAddress specifies the network address that Kanali will listen on for incoming requests
	FlagPrometheusServerSecureBindAddress = Flag{
		Long:  "prometheus.secure_bind_address",
		Short: "",
		Value: "0.0.0.0",
		Usage: "Network address that Kanali will listen on for incoming requests.",
	}
)
View Source
var (
	// FlagServerSecurePort sets the port that Kanali will listen on for incoming requests
	FlagServerSecurePort = Flag{
		Long:  "server.secure_port",
		Short: "",
		Value: 0,
		Usage: "Sets the port that Kanali will listen on for incoming requests.",
	}
	// FlagServerInsecurePort sets the port that Kanali will listen on for incoming requests
	FlagServerInsecurePort = Flag{
		Long:  "server.insecure_port",
		Short: "",
		Value: 8080,
		Usage: "Sets the port that Kanali will listen on for incoming requests.",
	}
	// FlagServerInsecureBindAddress specifies the network address that Kanali will listen on for incoming requests
	FlagServerInsecureBindAddress = Flag{
		Long:  "server.insecure_bind_address",
		Short: "",
		Value: "0.0.0.0",
		Usage: "Network address that Kanali will listen on for incoming requests.",
	}
	// FlagServerSecureBindAddress specifies the network address that Kanali will listen on for incoming requests
	FlagServerSecureBindAddress = Flag{
		Long:  "server.secure_bind_address",
		Short: "",
		Value: "0.0.0.0",
		Usage: "Network address that Kanali will listen on for incoming requests.",
	}
	// FlagServerTLSCertFile specifies the path to x509 certificate for HTTPS servers.
	FlagServerTLSCertFile = Flag{
		Long:  "server.tls.cert_file",
		Short: "c",
		Value: "",
		Usage: "Path to x509 certificate for HTTPS servers.",
	}
	// FlagServerTLSKeyFile pecifies the path to x509 private key matching --tls-cert-file
	FlagServerTLSKeyFile = Flag{
		Long:  "server.tls.key_file",
		Short: "k",
		Value: "",
		Usage: "Path to x509 private key matching --server.tls.cert_file.",
	}
	// FlagServerTLSCaFile specifies the path to x509 certificate authority bundle for mutual TLS
	FlagServerTLSCaFile = Flag{
		Long:  "server.tls.ca_file",
		Short: "",
		Value: "",
		Usage: "Path to x509 certificate authority bundle for mutual TLS.",
	}
)
View Source
var (
	// FlagKubernetesKubeConfig specifies path to kubeconfig file which is only needed if outside a cluster.
	FlagKubernetesKubeConfig = Flag{
		Long:  "kubernetes.kubeconfig",
		Short: "",
		Value: "",
		Usage: "Absolute path to kubeconfig file if outside of a cluster.",
	}
)
View Source
var (
	// FlagProcessLogLevel sets the logging level. Choose between 'debug', 'info', 'warn', 'error', 'fatal'
	FlagProcessLogLevel = Flag{
		Long:  "process.log_level",
		Short: "l",
		Value: log.InfoLevel,
		Usage: "Sets the logging level. Choose between 'debug', 'info', 'warn', 'error', 'fatal'.",
	}
)

Functions

func InitViper

func InitViper(appName string) error

func LogFlags

func LogFlags(fs *pflag.FlagSet)

func NewFlagSet

func NewFlagSet() *flagSet

Types

type Flag

type Flag struct {
	Long  string
	Short string
	Value interface{}
	Usage string
}

Flag is a simplified representation of a configuration item.

func (Flag) GetLong

func (f Flag) GetLong() string

GetLong returns the name of the flag

func (Flag) GetShort

func (f Flag) GetShort() string

GetShort returns the Short name of the flag

func (Flag) GetUsage

func (f Flag) GetUsage() string

GetUsage returns the flag's description.

Jump to

Keyboard shortcuts

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