Documentation
¶
Overview ¶
Package config contains common configuration values that are used by the various commands and subcommands in the CLI.
Index ¶
- func ConfigureHTTPTransportFromContext(ctx context.Context, transport *http.Transport) error
- func HTTPClientOptionsFromContext(ctx context.Context, options ...httpclient.Option) []httpclient.Option
- func InitializeLogging(cmd *cobra.Command, rootFlags *RootFlags) svc1log.Logger
- func NewHTTPClientFromContext(ctx context.Context, verifyTLS bool, timeout time.Duration) (*http.Client, error)
- func SetProxyConfig(ctx context.Context, httpProxy string, socksProxy string) context.Context
- type ProxyConfig
- type RootFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureHTTPTransportFromContext ¶ added in v0.0.100
func HTTPClientOptionsFromContext ¶ added in v0.0.100
func HTTPClientOptionsFromContext(ctx context.Context, options ...httpclient.Option) []httpclient.Option
func InitializeLogging ¶
InitializeLogging initializes the logging configuration for the CLI. It sets the log level based on the verbose and quiet flags provided by the user. If the quiet flag is set, the logger is set to discard all logs. If the verbose flag is set, the log level is set to debug. Otherwise, the log level is set to info. The logger is then returned for use by caller. We are using Palantir's Witchcraft logging library to structure our logging output.
func NewHTTPClientFromContext ¶ added in v0.0.100
Types ¶
type ProxyConfig ¶ added in v0.0.100
func ProxyConfigFromContext ¶ added in v0.0.100
func ProxyConfigFromContext(ctx context.Context) ProxyConfig
func (ProxyConfig) ConfigureHTTPTransport ¶ added in v0.0.100
func (p ProxyConfig) ConfigureHTTPTransport(transport *http.Transport) error
Click to show internal directories.
Click to hide internal directories.