httputils

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClientDetails

type HttpClientDetails struct {
	User        string
	Password    string
	ApiKey      string
	AccessToken string
	Headers     map[string]string
	Transport   *http.Transport
	HttpTimeout time.Duration
}

func (HttpClientDetails) Clone

func (httpClientDetails HttpClientDetails) Clone() *HttpClientDetails

type PollingAction added in v1.6.3

type PollingAction func() (shouldStop bool, responseBody []byte, err error)

type PollingExecutor added in v1.6.3

type PollingExecutor struct {
	// Maximum wait time in seconds.
	Timeout time.Duration
	// Number of seconds to sleep between polling attempts.
	PollingInterval time.Duration
	// Prefix to add at the beginning of each info/error message.
	MsgPrefix string
	// pollingAction is the operation to run until the condition fullfiled.
	PollingAction PollingAction
}

func (*PollingExecutor) Execute added in v1.6.3

func (runner *PollingExecutor) Execute() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL