telemetry

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTelemetry func(next http.Handler) http.Handler

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	ReqID            string
	Channel          string
	TimeBegin        time.Time
	TimeEnd          time.Time
	TimeExec         time.Time
	SearchTime       time.Duration
	ResponseTime     time.Duration
	Downtime         time.Duration
	Latency          time.Duration
	NotFount         bool
	EndPoint         string
	Method           string
	RemoteAddr       string
	HostName         string
	HostRequest      string
	Proto            string
	Status           int
	ContentLength    int64
	MTotal           uint64
	MUsed            uint64
	MFree            uint64
	PFree            float64
	RequestsHost     *Request
	RequestsEndpoint *Request
	Scheme           string
}

func NewMetric

func NewMetric(r *http.Request) *Metrics

func (*Metrics) CallExecute

func (m *Metrics) CallExecute()

func (*Metrics) CallRequests

func (m *Metrics) CallRequests(tag string) *Request

func (*Metrics) Done

func (m *Metrics) Done(res *http.Response) et.Json

func (*Metrics) DoneHandler

func (m *Metrics) DoneHandler() et.Json

func (*Metrics) DoneResponse

func (m *Metrics) DoneResponse(status int, contentLength int64) et.Json

func (*Metrics) NotFound

func (m *Metrics) NotFound(r *http.Request) et.Json

type Request

type Request struct {
	Tag     string
	Day     int
	Hour    int
	Minute  int
	Seccond int
	Limit   int
}

Jump to

Keyboard shortcuts

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