Documentation
¶
Index ¶
Constants ¶
View Source
const AUBaseURL string = "https://metrics-collector-au.cloudability.com/metricsample"
View Source
const CABaseURL string = "https://metrics-collector-ca.cloudability.com/metricsample"
View Source
const DefaultBaseURL string = "https://metrics-collector.cloudability.com/metricsample"
View Source
const EUBaseURL string = "https://metrics-collector-eu.cloudability.com/metricsample"
View Source
const GovBaseURL string = "https://metrics-collector-production-gov.cloudability.com/metricsample"
View Source
const INBaseURL string = "https://metrics-collector-in.cloudability.com/metricsample"
View Source
const JPBaseURL string = "https://metrics-collector-jp.cloudability.com/metricsample"
View Source
const MEBaseURL string = "https://metrics-collector-me.cloudability.com/metricsample"
View Source
const SGBaseURL string = "https://metrics-collector-sg.cloudability.com/metricsample"
View Source
const StagingBaseURL string = "https://metrics-collector-staging.cloudability.com/metricsample"
Variables ¶
This section is empty.
Functions ¶
func BuildProxyFunc ¶
func GetB64MD5Hash ¶
GetB64MD5Hash returns base64 encoded MD5 Hash
func GetUploadURLByRegion ¶
GetUploadURLByRegion returns the correct base url depending on the env variable CLOUDABILITY_UPLOAD_REGION. If value is not supported, default to us-west-2 (original) URL
Types ¶
type Configuration ¶
type Configuration struct {
Timeout time.Duration
Token string
MaxRetries int
BaseURL string
ProxyURL url.URL
ProxyAuth string
ProxyInsecure bool
UseProxyForGettingUploadURLOnly bool
Verbose bool
Region string
}
Configuration represents configurable values for the Cloudability Client
type MetricClient ¶
type MetricClient interface {
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
Click to show internal directories.
Click to hide internal directories.