metrics

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type MetricData

type MetricData struct {
	Type MetricType                        `json:"type"`
	Data metricstypes.TimeSeriesCollection `json:"data"`
	Unit string                            `json:"unit"`
}

type MetricType

type MetricType string
const (
	MetricTypeCPU           MetricType = "cpu"
	MetricTypeMemory        MetricType = "memory"
	MetricTypeHTTP          MetricType = "http"
	MetricTypeConnections   MetricType = "connections"
	MetricTypeInstanceCount MetricType = "instancecount"
	MetricTypeHTTPErrors    MetricType = "httperrors"
	MetricTypeResponseTime  MetricType = "responsetime"
)

type MetricsRequest

type MetricsRequest struct {
	ResourceID        string
	MetricTypes       []MetricType
	StartTime         *client.StartTimeParam
	EndTime           *client.EndTimeParam
	Resolution        *float32
	AggregationMethod *metricstypes.ApplicationMetricAggregationMethod
}

type MetricsResponse

type MetricsResponse struct {
	ResourceID string `json:"resourceId"`
	TimeRange  struct {
		Start *client.StartTimeParam `json:"start,omitempty"`
		End   *client.EndTimeParam   `json:"end,omitempty"`
	} `json:"timeRange"`
	Metrics []MetricData `json:"metrics"`
}

type Repo

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

func NewRepo

func NewRepo(c *client.ClientWithResponses) *Repo

func (*Repo) GetMetrics

func (r *Repo) GetMetrics(ctx context.Context, req MetricsRequest) (*MetricsResponse, error)

Jump to

Keyboard shortcuts

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