Documentation ¶
Index ¶
Constants ¶
const GET = "GET"
GET is used for HTTP GET calls
const POST = "POST"
POST is used for HTTP POST calls
const PUT = "PUT"
PUT is used for HTTP PUT calls
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientHost ¶
type ClientHost struct { APIKey string `json:"-"` // never marshal this Host string // NoProxy will be set to true when the proxy setting for the trace API endpoint // needs to be ignored (e.g. it is part of the "no_proxy" list in the yaml settings). NoProxy bool ProxyURL *url.URL SkipSSLValidation bool ContentEncoding ContentEncoding // TODO: make this per request }
ClientHost specifies an host that the client communicates with.
type ContentEncoding ¶
type ContentEncoding interface {
// contains filtered or unexported methods
}
ContentEncoding encodes the payload
var IdentityContentType ContentEncoding = &identityContentType{}
IdentityContentType encodes the payload using the identity function
type GzipContentEncoding ¶
type GzipContentEncoding struct {
// contains filtered or unexported fields
}
GzipContentEncoding encodes the payload using gzip algorithm
func NewGzipContentEncoding ¶
func NewGzipContentEncoding(level int) *GzipContentEncoding
NewGzipContentEncoding creates a new Gzip content type
type HTTPResponse ¶
HTTPResponse is used to represent the response from the request
type RetryableHTTPClient ¶
type RetryableHTTPClient interface { Get(path string) *HTTPResponse Put(path string, body []byte) *HTTPResponse Post(path string, body []byte) *HTTPResponse }
RetryableHTTPClient describes the functionality of a http client with retries and backoff
func NewHTTPClient ¶
func NewHTTPClient(baseURLConfigKey string) RetryableHTTPClient
NewHTTPClient returns a RetryableHTTPClient containing a http.Client configured with the Agent options.
func NewStackStateClient ¶
func NewStackStateClient() RetryableHTTPClient
NewStackStateClient returns a RetryableHTTPClient containing a http.Client configured with the Agent options.
type StackStateClient ¶
type StackStateClient struct {
RetryableHTTPClient
}
StackStateClient creates a wrapper around the RetryableHTTPClient that is used for communication with StackState over http(s)