cgcatalogue

package
v1.3.29 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 10 Imported by: 0

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.

func (*Client) Account

func (c *Client) Account(ID string) (awscatalogue.Account, error)

Account returns account information for the given AWS account ID.

func (*Client) Accounts

func (c *Client) Accounts() ([]awscatalogue.Account, error)

Accounts returns AWS accounts from CG catalogue.

Jump to

Keyboard shortcuts

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