Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlagAlias(cmd *cobra.Command, alias, flag string) error
- func DeprecateFlags(cmd *cobra.Command, deprecations ...DeprecatedFlag) error
- func GetCacheSRV() string
- func GetConsumer() (consumer.Consumer, error)
- func HideFlags(cmd *cobra.Command, flags ...string) error
- func PersistentStartupProcessFlags() error
- func ViperInit()
- type DeprecatedFlag
Constants ¶
View Source
const ( ConsumerFile = "file" ConsumerTarExtractor = "tar-extractor" ConsumerNull = "null" )
View Source
const ( // these two options are a massive hack. They're only availabe via // envvar, not command line OptCacheNodesSRVNameByHostCIDR = "cache-nodes-srv-name-by-host-cidr" OptHostIP = "host-ip" OptCacheNodesSRVName = "cache-nodes-srv-name" OptConcurrency = "concurrency" OptConnTimeout = "connect-timeout" OptExtract = "extract" OptForce = "force" OptForceHTTP2 = "force-http2" OptLoggingLevel = "log-level" OptMaxChunks = "max-chunks" OptMaxConnPerHost = "max-conn-per-host" OptMinimumChunkSize = "minimum-chunk-size" OptOutputConsumer = "output" OptResolve = "resolve" OptRetries = "retries" OptVerbose = "verbose" )
Variables ¶
View Source
var HostToIPResolutionMap = make(map[string]string)
HostToIPResolutionMap is a map of hostnames to IP addresses TODO: Eliminate this global variable
Functions ¶
func DeprecateFlags ¶ added in v0.3.2
func DeprecateFlags(cmd *cobra.Command, deprecations ...DeprecatedFlag) error
func GetCacheSRV ¶ added in v0.3.2
func GetCacheSRV() string
GetCacheSRV returns the SRV name of the cache to use, if set.
func GetConsumer ¶ added in v0.3.2
GetConsumer returns the consumer specified by the user on the command line or an error if the consumer is invalid. Note that this function explicitly calls viper.GetString(OptExtract) internally.
func PersistentStartupProcessFlags ¶
func PersistentStartupProcessFlags() error
Types ¶
type DeprecatedFlag ¶ added in v0.3.2
Click to show internal directories.
Click to hide internal directories.