telemetry

package
v0.0.0-...-32c12ea Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPHandler

func HTTPHandler(db TelemetryDB) http.HandlerFunc

Types

type CSVLog

type CSVLog struct{}

func (*CSVLog) Save

func (db *CSVLog) Save(t *Telemetry) error

type JSONLog

type JSONLog struct{}

func (*JSONLog) Save

func (db *JSONLog) Save(t *Telemetry) error

type LogDB

type LogDB struct{}

func (*LogDB) Save

func (db *LogDB) Save(t *Telemetry) error

type NoneDB

type NoneDB struct{}

func (*NoneDB) Save

func (db *NoneDB) Save(t *Telemetry) error

type PostgresDB

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

func (*PostgresDB) Save

func (db *PostgresDB) Save(t *Telemetry) error

type Telemetry

type Telemetry struct {
	Timestamp time.Time `json:"timestamp"`
	Remote    net.IP    `json:"remote"`
	UA        string    `json:"ua"`
	DL        float64   `json:"dl"`
	UL        float64   `json:"ul"`
	Ping      float64   `json:"ping"`
	Jitter    float64   `json:"jitter"`
	Log       string    `json:"log"`
	Building  string    `json:"building"`
	SessionID string    `json:"sessionid"`
}

func (*Telemetry) String

func (t *Telemetry) String() string

type TelemetryDB

type TelemetryDB interface {
	Save(*Telemetry) error
}

func MakeDB

func MakeDB(name string) (TelemetryDB, error)

func NewCSVLog

func NewCSVLog() (TelemetryDB, error)

func NewJSONLog

func NewJSONLog() (TelemetryDB, error)

func NewLogDB

func NewLogDB() (TelemetryDB, error)

func NewNoneDB

func NewNoneDB() (TelemetryDB, error)

func NewPostgresDB

func NewPostgresDB() (TelemetryDB, error)

Jump to

Keyboard shortcuts

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