client

package
v0.0.0-...-64e3f11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetB64MD5Hash

func GetB64MD5Hash(name string) (b64Hash string, rerr error)

GetB64MD5Hash returns base64 encoded MD5 Hash

Types

type Configuration

type Configuration struct {
	Timeout       time.Duration
	Token         string
	MaxRetries    int
	BaseURL       string
	ProxyURL      url.URL
	ProxyAuth     string
	ProxyInsecure bool
	Verbose       bool
}

Configuration represents configurable values for the Cloudability Client

type MetricClient

type MetricClient interface {
	SendMeasurement(measurements []measurement.Measurement) error
	SendMetricSample(*os.File, string, string) error
	GetUploadURL(*os.File, string, string, string, int) (string, string, error)
}

MetricClient represents a interface to send a cloudability measurement or metrics sample to an endpoint.

func NewHTTPMetricClient

func NewHTTPMetricClient(cfg Configuration) (MetricClient, error)

NewHTTPMetricClient will configure a new instance of a Cloudability client.

type MetricSampleResponse

type MetricSampleResponse struct {
	Location string `json:"location"`
}

MetricSampleResponse represents the response from the uploadmetrics endpoint

Jump to

Keyboard shortcuts

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