stats

package
v0.0.0-...-8a9faf9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: GPL-3.0 Imports: 1 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 {
	Requests200     uint64
	Requests307     uint64
	Requests403     uint64
	Requests404     uint64
	Requests503     uint64
	Requests200List []string
	Requests307List []string
	Requests403List []string
	Requests404List []string
	Requests503List []string
}

Stats stores stat data while server is running

func NewStats

func NewStats() *Stats

NewStats constructor for ServerStats

func (ss *Stats) Add200Link(link string)

Add200Link adds a link to the 200 requests list

func (ss *Stats) Add307Link(link string)

Add307Link adds a link to the 307 requests list

func (ss *Stats) Add403Link(link string)

Add403Link adds a link to the 403 requests list

func (ss *Stats) Add404Link(link string)

Add404Link adds a link to the 404 requests list

func (ss *Stats) Add503Link(link string)

Add503Link adds a link to the 503 requests list

func (*Stats) IncRequests200

func (ss *Stats) IncRequests200()

IncRequests200 increments total http 200 requests

func (*Stats) IncRequests307

func (ss *Stats) IncRequests307()

IncRequests307 increments total http 307 requests

func (*Stats) IncRequests403

func (ss *Stats) IncRequests403()

IncRequests403 increments total http 403 requests

func (*Stats) IncRequests404

func (ss *Stats) IncRequests404()

IncRequests404 increments total http 404 requests

func (*Stats) IncRequests503

func (ss *Stats) IncRequests503()

IncRequests503 increments total http 503 requests

func (*Stats) JSONDump

func (ss *Stats) JSONDump() (string, error)

JSONDump converts struct to json

Jump to

Keyboard shortcuts

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