Documentation ¶
Index ¶
- Constants
- func ConfigAdd(path string)
- func NewClient(ctx context.Context, plugins ...Plugin) (*resty.Client, error)
- func NewClientWithConfigPath(ctx context.Context, path string, plugins ...Plugin) (*resty.Client, error)
- func NewClientWithOptions(ctx context.Context, options *Options, plugins ...Plugin) *resty.Client
- type Options
- type OptionsTransport
- type Plugin
Constants ¶
View Source
const (
PluginsRoot = root + ".plugins"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { Debug bool ConnectionTimeout time.Duration CloseConnection bool KeepAlive time.Duration RequestTimeout time.Duration FallbackDelay time.Duration Transport OptionsTransport Host string }
Options represents resty client options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.
type OptionsTransport ¶
type OptionsTransport struct { DisableCompression bool DisableKeepAlives bool MaxIdleConnsPerHost int ResponseHeaderTimeout time.Duration ForceAttemptHTTP2 bool `config:"forceAttemptHTTP2"` MaxIdleConns int MaxConnsPerHost int IdleConnTimeout time.Duration TLSHandshakeTimeout time.Duration ExpectContinueTimeout time.Duration }
OptionsTransport represents resty transport options.
Click to show internal directories.
Click to hide internal directories.