metricadapter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxItem = 1000000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterConfig

type AdapterConfig struct {
	// app metrics server address
	ServingPort int `json:"serving_port"`
}

AdapterConfig group config of multiple adapters

type Manager

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

Manager group multiple adapters

func NewAdapterManager

func NewAdapterManager(config AdapterConfig) *Manager

NewAdapterManager create adapter manager

func (*Manager) Run

func (m *Manager) Run(sig <-chan os.Signal)

Run start to run metric adapter manager

type ReportDetailData

type ReportDetailData struct {

	// raw single latency value
	// target latency value
	SLO float64 `json:"slo"`
	// avg or percentile value
	SLI      float64        `json:"sli"`
	Duration times.Duration `json:"duration"`
	Data     []float64      `json:"data"`
	// contains filtered or unexported fields
}

ReportDetailData group latency data reported by workload

type ReportSloData

type ReportSloData struct {

	// raw single latency value
	// target latency value
	SLO   float64 `json:"slo"`
	Value float64 `json:"value"`
	// contains filtered or unexported fields
}

ReportSloData represent latency data reported by workload

type Result

type Result struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

Result is the restful format

Jump to

Keyboard shortcuts

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