metrics

package
Version: v0.0.0-...-58aa412 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNS                          = errorx.NewNamespace("error.api.metrics")
	ErrLoadPrometheusAddressFailed = ErrNS.NewType("load_prom_address_failed")
	ErrPrometheusNotFound          = ErrNS.NewType("prom_not_found")
	ErrPrometheusQueryFailed       = ErrNS.NewType("prom_query_failed")
)

Functions

func RegisterRouter

func RegisterRouter(r *gin.RouterGroup, auth *user.AuthService, s *Service)

Types

type GetPromAddressConfigResponse

type GetPromAddressConfigResponse struct {
	CustomizedAddr string `json:"customized_addr"`
	DeployedAddr   string `json:"deployed_addr"`
}

type PutCustomPromAddressRequest

type PutCustomPromAddressRequest struct {
	Addr string `json:"address"`
}

type PutCustomPromAddressResponse

type PutCustomPromAddressResponse struct {
	NormalizedAddr string `json:"normalized_address"`
}

type QueryRequest

type QueryRequest struct {
	StartTimeSec int    `json:"start_time_sec" form:"start_time_sec"`
	EndTimeSec   int    `json:"end_time_sec" form:"end_time_sec"`
	StepSec      int    `json:"step_sec" form:"step_sec"`
	Query        string `json:"query" form:"query"`
}

type QueryResponse

type QueryResponse struct {
	Status string                 `json:"status"`
	Data   map[string]interface{} `json:"data"`
}

type Service

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

func NewService

func NewService(lc fx.Lifecycle, p ServiceParams) *Service

type ServiceParams

type ServiceParams struct {
	fx.In
	HTTPClient *httpc.Client
	EtcdClient *clientv3.Client
	PDClient   *pd.Client
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto