fetch

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchErrorType

type FetchErrorType uint8
const (
	FetchOK        FetchErrorType = 0
	FetchCtxDone   FetchErrorType = 1
	FetchTimeOut   FetchErrorType = 2
	FetchRPC       FetchErrorType = 3
	FetchDoNothing FetchErrorType = 4
)

type Fetcher

type Fetcher interface {
	Fetch(context.Context, *obi.GetMetricsRequest) (*v1alpha1.ObservabilityIndicantStatusMetricInfo, FetchErrorType, error)
	GetPluginName() string
	Health() bool
}

func NewFetcher

func NewFetcher(conn *grpc.ClientConn, fetchTimeout time.Duration) Fetcher

type Request

type Request struct {
	// metric, log or trace
	From          string
	Req           *obi.GetMetricsRequest
	MetricName    string
	ResourceNames ResourceNameWithKind // kind
	Namespace     string
	Start, End    int64

	Query        string
	Unit         string
	Aggregations []string
}

type ResourceNameWithKind

type ResourceNameWithKind struct {
	Names []string
	Kind  string
}

func (ResourceNameWithKind) String

func (r ResourceNameWithKind) String() string

type Resp

type Resp struct {
	Unit        string
	Aggregation map[string]float64
}

Jump to

Keyboard shortcuts

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