stats

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stats

type Stats struct {
	sync.RWMutex

	Started int64  `json:"started"`
	Memory  string `json:"memory"`
	Threads int    `json:"threads"`
	GC      string `json:"gc_pause"`

	Counters []*counter `json:"counters"`
	// contains filtered or unexported fields
}

Stats of service

func New

func New() *Stats

New stats...

func (*Stats) Record

func (s *Stats) Record(c string, t int)

Record ...

func (*Stats) ServeHTTP

func (s *Stats) ServeHTTP(h http.Handler) http.Handler

ServeHTTP ...

func (*Stats) Start

func (s *Stats) Start() error

Start ...

func (*Stats) StatsHandler

func (s *Stats) StatsHandler(w http.ResponseWriter, r *http.Request)

StatsHandler ...

func (*Stats) Stop

func (s *Stats) Stop() error

Stop ...

Jump to

Keyboard shortcuts

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