statzagg

package module
v0.0.0-...-f6d851c Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 7 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

statzagg

aggregate statistics from various other consumers

class diagram

class diagram

Documentation

Overview

Package statzagg - aggregate statitics posted by other clients

Package statzagg - aggregate statitics posted by other clients

Package statzagg - aggregate statitics posted by other clients

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventStats

type EventStats struct {
	EventClock time.Time     //Tx Begin
	ID         string        //Client ID
	Name       string        //Name of event
	Err        error         //Error
	Values     []interface{} //Value
}

EventStats - Events stats

func (*EventStats) String

func (h *EventStats) String() string

String - output of user readable

type HTTPClientStatz

type HTTPClientStatz struct {
	httpstat.Result           //HTTP statistic
	BegClock        time.Time //Tx Begin
	EndClock        time.Time //Tx Completed
	ID              string    //Client ID
	URL             string    //URL
	Status          int       //HTTP status code
	Bytes           int64     //HTTP response bytes
	Err             error     //Client error
	CdnHeaders      string    //cdn record for tracing
}

HTTPClientStatz - client stats

func (*HTTPClientStatz) ReadHTTPHeader

func (h *HTTPClientStatz) ReadHTTPHeader(hdr *http.Header) error

ReadHTTPHeader - reads required details from header

func (*HTTPClientStatz) String

func (h *HTTPClientStatz) String() string

String - output of user readable

type LogStatzAgg

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

LogStatzAgg - Write logs of metrics

func NewLogStatzAgg

func NewLogStatzAgg(wtr io.Writer) *LogStatzAgg

NewLogStatzAgg - Create LogStatzAgg

func (*LogStatzAgg) PostEventStats

func (l *LogStatzAgg) PostEventStats(ctx context.Context, statz *EventStats)

PostEventStats - Post Event Tx

func (*LogStatzAgg) PostHTTPClientStats

func (l *LogStatzAgg) PostHTTPClientStats(ctx context.Context, statz *HTTPClientStatz)

PostHTTPClientStats - post stats

type NullStatzAgg

type NullStatzAgg struct {
}

NullStatzAgg - Ignores Statz

func (*NullStatzAgg) PostEventStats

func (n *NullStatzAgg) PostEventStats(ctx context.Context, statz *EventStats)

PostEventStats - Post Event Tx

func (*NullStatzAgg) PostHTTPClientStats

func (n *NullStatzAgg) PostHTTPClientStats(ctx context.Context, statz *HTTPClientStatz)

PostHTTPClientStats - Post Http Tx

type StatzAgg

type StatzAgg interface {
	PostHTTPClientStats(context.Context, *HTTPClientStatz) //PostHTTPClientStats - Post Http Tx
	PostEventStats(context.Context, *EventStats)           //PostEventStats - Post Event Tx
}

StatzAgg - Aggregates Statz

Jump to

Keyboard shortcuts

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