dashboard

package
v0.0.0-...-644e962 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(storage Storage) *Handler

func (*Handler) Serve

func (h *Handler) Serve(addr string)

type Record

type Record struct {
	Identifier string    `json:"identifier"`
	Bytes      int64     `json:"bytes"`
	Time       time.Time `json:"time"`
}

type Statistician

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

func NewStatistician

func NewStatistician(trafficsFile string, storage Storage) *Statistician

func (*Statistician) Run

func (s *Statistician) Run()

type Storage

type Storage interface {
	Put(record *Record) error
	List(identifier string, interval time.Duration, begin time.Time, end time.Time) (records []*Record, err error)
}

func NewStaticStorage

func NewStaticStorage() Storage

Jump to

Keyboard shortcuts

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