metrics

package
v0.0.0-...-b4d2924 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Measure

func Measure(e zapcore.Entry) error

Measure logger level rate

Types

type Metrics

type Metrics struct {
	TopicsHistogramVec        *prometheus.HistogramVec
	SubscribtionsHistogramVec *prometheus.HistogramVec
	SnapshotsHistogramVec     *prometheus.HistogramVec
	MessagesHistogramVec      *prometheus.HistogramVec
	MessagesSizeHistogramVec  *prometheus.HistogramVec

	//logger
	LogMetricsCounterVec *prometheus.CounterVec
}

func GetMetrics

func GetMetrics() *Metrics

GetMetrics return metrics object

type Server

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

Server status server

func NewServer

func NewServer(config *conf.Status) *Server

NewServer creat status server

func (*Server) GracefulStop

func (s *Server) GracefulStop() error

GracefulStop serve graceful stop

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string) error

ListenAndServe start the service by address

func (*Server) Serve

func (s *Server) Serve(lis net.Listener) error

Serve accepts incoming connections on the Listener l

func (*Server) Stop

func (s *Server) Stop() error

Stop Close serve fd

Jump to

Keyboard shortcuts

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