metric

package
v1.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrometheusService

func NewPrometheusService() (*service, error)

NewPrometheusService create a new prometheus service

Types

type HTTP

type HTTP struct {
	Handler    string
	Method     string
	StatusCode string
	StartedAt  time.Time
	FinishedAt time.Time
	Duration   float64
}

HTTP application

func NewHTTP

func NewHTTP(handler string, method string) *HTTP

NewHTTP create a new HTTP app

func (*HTTP) Finished

func (h *HTTP) Finished()

Finished app finished

func (*HTTP) Started

func (h *HTTP) Started()

Started start monitoring the app

type Service

type Service interface {
	SaveHTTP(h *HTTP)
}

Service definition

Jump to

Keyboard shortcuts

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