Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TypeDefault is used to select the default Go HTTP client. TypeDefault = "DEFAULT" // TypeSmart is used to select the transportd HTTP client. // Deprecated: TypeSmart is no longer available as we no longer maintain transportd TypeSmart = "SMART" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶
type Component struct {
Default *DefaultComponent
}
Component is the top level HTTP client component.
func NewComponent ¶
func NewComponent() *Component
NewComponent populates an HTTPComponent with defaults.
type Config ¶
type Config struct {
Type string `description:"The type of HTTP client. Choices are SMART and DEFAULT."`
Default *DefaultConfig
}
Config wraps all HTTP related settings.
type DefaultComponent ¶
type DefaultComponent struct{}
DefaultComponent is a component for creating the default Go HTTP client.
func (*DefaultComponent) New ¶
func (*DefaultComponent) New(ctx context.Context, conf *DefaultConfig) (http.RoundTripper, error)
New constructs a client from the given configuration
func (*DefaultComponent) Settings ¶
func (*DefaultComponent) Settings() *DefaultConfig
Settings returns the default configuration.
type DefaultConfig ¶
type DefaultConfig struct {
ContentType string
}
DefaultConfig contains all settings for the default Go HTTP client.
type RoundTripper ¶
type RoundTripper = http.RoundTripper
RoundTripper is the interface that handles all HTTP operations. It is almost exclusively used with an http.Client wrapped around it. This is included here for documentation purposes only.
Click to show internal directories.
Click to hide internal directories.