datadog

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigInstance

func ConfigInstance() interface{}

func GetConfig

func GetConfig(connection *plugin.Connection) datadogConfig

GetConfig :: retrieve and cast connection config from query data

func Plugin

func Plugin(ctx context.Context) *plugin.Plugin

Types

type CustomTransport

type CustomTransport struct {
	// contains filtered or unexported fields
}

CustomTransport holds DefaultTransport configuration and is used to for custom http error handling

func NewCustomTransport

func NewCustomTransport(t http.RoundTripper, opt CustomTransportOptions) *CustomTransport

NewCustomTransport returns new CustomTransport struct

func (*CustomTransport) DefaultBackoff

func (t *CustomTransport) DefaultBackoff(min, max time.Duration, attemptNum int, resp *http.Response) time.Duration

It also tries to parse Retry-After response header when a http.StatusTooManyRequests (HTTP Code 429) is found in the resp parameter. Hence it will return the number of seconds the server states it may be ready to process more requests from this client.

func (*CustomTransport) RoundTrip

func (t *CustomTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip method used to retry http errors

type CustomTransportOptions

type CustomTransportOptions struct {
	Timeout *time.Duration
}

CustomTransportOptions Set options for CustomTransport

Jump to

Keyboard shortcuts

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