metrics

package
v0.0.0-...-d989b54 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(promListen string)

Types

type ServerMetrics

type ServerMetrics struct {
	NodeEventCounter *prometheus.CounterVec
	NodeAliveCounter *prometheus.CounterVec
}
var (
	Metrics *ServerMetrics
)

func NewServerMetrics

func NewServerMetrics() *ServerMetrics

func (*ServerMetrics) AddNodeAlive

func (m *ServerMetrics) AddNodeAlive(id, domain, hostname string, v uint64)

存活的节点添加

func (*ServerMetrics) AddNodeEvent

func (m *ServerMetrics) AddNodeEvent(typ, event, id, domain, hostname string, v int64)

节点事件添加

Jump to

Keyboard shortcuts

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