Help us shape the future of Go! Take the 2026 Go Developer Survey

status

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	Topic      string    `json:"topic"`
	CanRead    bool      `json:"canRead"`
	CanWrite   bool      `json:"canWrite"`
	Connected  time.Time `json:"connected"`
	ExpiresAt  time.Time `json:"expiresAt"`
	RemoteAddr string    `json:"remoteAddr"`
	UserAgent  string    `json:"userAgent"`
	Stats      RxTx      `json:"stats"`
}

type RxTx

type RxTx struct {
	Tx Statistics `json:"tx"`
	Rx Statistics `json:"rx"`
}

RxTx represents statistics for both receive and transmit

type Statistics

type Statistics struct {
	Last  time.Duration `json:"last"` //duration since last message
	Size  float64       `json:"size"`
	FPS   float64       `json:"fps"`
	Never bool          `json:"never"`
}

Statistics represents statistics about what has been sent/received

func (*Statistics) UnmarshalJSON

func (s *Statistics) UnmarshalJSON(data []byte) (err error)

type Status

type Status struct {
	Status chan []Report
	// contains filtered or unexported fields
}

func New

func New() *Status

func (*Status) Connect

func (s *Status) Connect(ctx context.Context, to, token string)

Jump to

Keyboard shortcuts

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