Documentation ¶
Index ¶
- type HTTP
- func (h *HTTP) EnableXRay()
- func (h *HTTP) Get(ctx context.Context, url string, headers ...Header) (*http.Response, error)
- func (h *HTTP) IsEnabled() bool
- func (h *HTTP) Post(ctx context.Context, url string, payload interface{}, headers ...Header) (resp *http.Response, err error)
- func (h *HTTP) Setup()
- type Header
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTP ¶
type HTTP struct {
Client *retryablehttp.Client
}
HTTP wraps a retryable HTTP client.
func (*HTTP) EnableXRay ¶
func (h *HTTP) EnableXRay()
EnableXRay replaces the standard retryable HTTP client with an AWS XRay client. This method can be used when making HTTP calls on AWS infrastructure and should be enabled by looking for the environment variable "AWS_XRAY_DAEMON_ADDRESS".
func (*HTTP) IsEnabled ¶
IsEnabled identifies if the HTTP client is enabled and ready to use. This method can be used for lazy loading the client.
Click to show internal directories.
Click to hide internal directories.