Documentation ¶
Overview ¶
Package cmd implements widely used cmd arguments and flags.
Index ¶
Constants ¶
const KubeConfigArg string = "kubeconfig"
KubeConfigArg is the CLI argument for the location of the kube config file
const LogFormatArg string = "log-format"
LogFormatArg is the CLI argument for the logging format
const LogLevelArg string = "log-level"
LogLevelArg is the CLI argument for the logging level
const MongoConnectionStringArg string = "mongo-connection-string"
MongoConnectionStringArg is the CLI argument for the MongoDB connection string
const MongoDatabaseArg string = "mongo-database"
MongoDatabaseArg is the CLI argument for the MongoDB database
const OutOfClusterArg string = "out-of-cluster"
OutOfClusterArg is the CLI argument to specify out-of-cluster usage
const PodNamespaceArg string = "pod-namespace"
PodNamespaceArg is the CLI argument for the pod namespace
Variables ¶
var LogFormatFlag = &cli.StringFlag{ Name: LogFormatArg, Usage: "Log format (plain, json)", EnvVars: []string{"LOG_FORMAT"}, Value: "plain", }
LogFormatFlag is the urfave/cli Flag configuration for the logging format
var LogLevelFlag = &cli.StringFlag{ Name: LogLevelArg, Usage: "Log level (trace, debug, info, warn, error)", EnvVars: []string{"LOG_LEVEL"}, Value: "info", }
LogLevelFlag is the urfave/cli Flag configuration for the logging level
var MongoConnectionStringFlag = &cli.StringFlag{ Name: MongoConnectionStringArg, Usage: "Specifies the MongoDB connection string.", EnvVars: []string{"MONGO_CONNECTION_STRING"}, Required: true, }
MongoConnectionStringFlag is the urfave/cli Flag configuration for the MongoDB connection string
var MongoDatabaseFlag = &cli.StringFlag{ Name: MongoDatabaseArg, Usage: "Specifies the MongoDB database", EnvVars: []string{"MONGO_DATABASE"}, Required: true, }
MongoDatabaseFlag is the urfave/cli Flag configuration for the MongoDB database
var OutOfClusterFlag = &cli.BoolFlag{ Name: OutOfClusterArg, Usage: "Will use the default ~/.kube/config file on the local machine to connect to the cluster externally.", Aliases: []string{"local"}, }
OutOfClusterFlag is the urfave/cli Flag configuration for out-of-cluster usage
var PodNamespaceFlag = &cli.StringFlag{ Name: PodNamespaceArg, Usage: "Specifies the namespace that current application pod is running in.", EnvVars: []string{"POD_NAMESPACE"}, }
PodNamespaceFlag is the urfave/cli Flag configuration for the pod namespace
Functions ¶
func KubeConfig ¶
func KubeConfig() *cli.StringFlag
KubeConfig prepares a urfave/cli Flag configuration for the kube config file
func PrepareLogger ¶
func PrepareLogger(ctx *cli.Context)
PrepareLogger prepares the global logger with options from CLI args
Types ¶
This section is empty.