prometheus

package
Version: v0.0.0-...-5dc576f Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Port string
	Path string
	// contains filtered or unexported fields
}

Server represents the implementation of Prometheus server object.

func NewServer

func NewServer(port, path string) *Server

NewServer creates new Prometheus server.

func (*Server) Monitor

func (s *Server) Monitor(targets ...*Target)

Monitor registers gin engine(s) to monitor.

func (*Server) Start

func (s *Server) Start() error

Start starts the HTTP server.

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop stops the HTTP server.

type Target

type Target struct {
	HTTPServer             *httpserver.Server
	ExcludePaths           []string
	MetricsPrefix          string
	GroupedStatus          bool
	DisableMeasureReqSize  bool
	DisableMeasureRespSize bool
	DisableMeasureInflight bool
}

Target defines a target gin engine to monitor.

Source Files

Jump to

Keyboard shortcuts

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