status

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: GPL-3.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 Report

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

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