Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JitterFactor = 0.5
JitterFactor defines the jitter factor used by the backoff client.
Functions ¶
This section is empty.
Types ¶
type BackOffClient ¶
type BackOffClient struct { *Client // contains filtered or unexported fields }
BackOffClient implements retries with backoff and jitter on top an CGApicatalogueClient.
func NewBackOffClient ¶
func NewBackOffClient(c *Client, rinterval, mretries int) *BackOffClient
NewBackOffClient returns a retries with backoff and client from an CGCatalog client using the given retry interval and max retries paramters.
func (*BackOffClient) Account ¶
func (c *BackOffClient) Account(ID string) (awscatalogue.Account, error)
Account executes the Account operation with retries.
func (*BackOffClient) Accounts ¶
func (c *BackOffClient) Accounts() ([]awscatalogue.Account, error)
Accounts executes the Accounts operation with retries.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements functions exposed by the CG Catalogue API.
func New ¶
func New(APIKey string, baseURL string, rt http.RoundTripper) *Client
New returns a new Client given an API KEY, a baseURL and round tripper if the it is nil it will be set to the default http round tripper.
Click to show internal directories.
Click to hide internal directories.