Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Bucket string `yaml:"bucket"` Region string `yaml:"region"` AppID string `yaml:"app_id"` Endpoint string `yaml:"endpoint"` SecretKey string `yaml:"secret_key"` SecretID string `yaml:"secret_id"` HTTP HTTPConfig `yaml:"http"` }
Config encapsulates the necessary config values to instantiate an cos client.
func (*Config) RegisterFlags ¶
RegisterFlags registers the flags for COS storage
func (*Config) RegisterFlagsWithPrefix ¶
RegisterFlagsWithPrefix register the flags for COS storage with provided prefix
type HTTPConfig ¶
type HTTPConfig struct { IdleConnTimeout time.Duration `yaml:"idle_conn_timeout" category:"advanced"` ResponseHeaderTimeout time.Duration `yaml:"response_header_timeout" category:"advanced"` InsecureSkipVerify bool `yaml:"insecure_skip_verify" category:"advanced"` TLSHandshakeTimeout time.Duration `yaml:"tls_handshake_timeout" category:"advanced"` ExpectContinueTimeout time.Duration `yaml:"expect_continue_timeout" category:"advanced"` MaxIdleConns int `yaml:"max_idle_connections" category:"advanced"` MaxIdleConnsPerHost int `yaml:"max_idle_connections_per_host" category:"advanced"` MaxConnsPerHost int `yaml:"max_connections_per_host" category:"advanced"` // Allow upstream callers to inject a round tripper Transport http.RoundTripper `yaml:"-"` }
HTTPConfig stores the http.Transport configuration for the COS client.
func (*HTTPConfig) RegisterFlagsWithPrefix ¶
func (cfg *HTTPConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)
RegisterFlagsWithPrefix registers the flags for COS storage with the provided prefix
Click to show internal directories.
Click to hide internal directories.