metric

package
v1.20.6 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClbMetric

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

ClbMetric clb metrics

func NewClbMetric

func NewClbMetric(port int) *ClbMetric

NewClbMetric create clb metrics

func (*ClbMetric) Close

func (cm *ClbMetric) Close() error

Close close clb metric

func (*ClbMetric) RegisterResource

func (cm *ClbMetric) RegisterResource(mr Resource)

RegisterResource register resource to clb metric

func (*ClbMetric) Run

func (cm *ClbMetric) Run() error

Run start metric server

type JSONStatus

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

JSONStatus json status

func (*JSONStatus) Register

func (js *JSONStatus) Register(container *restful.Container)

Register implements metric.Resource interface

type PromMetric

type PromMetric struct {
}

PromMetric metric for prometheus

func (*PromMetric) Register

func (p *PromMetric) Register(container *restful.Container)

Register implements Resource interface

type Resource

type Resource interface {
	Register(container *restful.Container)
}

Resource for a kind of clb metric

func NewJSONStatus

func NewJSONStatus(hf restful.RouteFunction) Resource

NewJSONStatus new json status object

func NewPromMetric

func NewPromMetric() Resource

NewPromMetric create prometheus metric

func NewVersionMetric

func NewVersionMetric() Resource

type VersionMetric

type VersionMetric struct {
}

func (*VersionMetric) Register

func (vm *VersionMetric) Register(container *restful.Container)

type VersionMetricResp

type VersionMetricResp struct {
	Version   string `json:"version"`
	Tag       string `json:"tag"`
	BuildTime string `json:"buildtime"`
	GitHash   string `json:"githash"`
}

Jump to

Keyboard shortcuts

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