gcp

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCP

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

func NewGCP

func NewGCP() (*GCP, error)

NewGCP currently needs a service account configured or gcloud auth within same session to function

func (*GCP) Close added in v0.13.1

func (p *GCP) Close() error

Close closes the GCP monitoring client connection See: https://pkg.go.dev/cloud.google.com/go@v0.81.0/monitoring/apiv3/v2#MetricClient.Close

func (*GCP) Get99PercentLatencyMetricForResource

func (p *GCP) Get99PercentLatencyMetricForResource(resourceID string, from, to time.Time) (float64, error)

Get99PercentLatencyMetricForResource retrieves latency data for a resource on GCP and returns the mean of the 99th Percentile latencies across regions of the given resource

func (*GCP) GetAvailabilityPercentage added in v0.11.0

func (p *GCP) GetAvailabilityPercentage(resourceID string, from, to time.Time) (float64, error)

func (*GCP) GetErrorPercentageMetricForResource

func (p *GCP) GetErrorPercentageMetricForResource(resourceID string, from, to time.Time) (float64, error)

GetErrorPercentageMetricForResource retrieves the error status code data for a resource on GCP and calculates percentage of 500 status code

func (*GCP) GetLatencyAboveThresholdPercentage added in v0.11.0

func (p *GCP) GetLatencyAboveThresholdPercentage(resourceID string, from, to time.Time, threshold int) (float64, error)

func (*GCP) ResourceFromSelector added in v0.18.0

func (p *GCP) ResourceFromSelector(s entities.Selector) string

ResourceFromSelector - identifies the resource ID given a selector.

Jump to

Keyboard shortcuts

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