fwl

package module
v0.0.0-...-0d23d6e Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostics

type Diagnostics struct {
	Hostname string `json:"hostname"`

	AvgLoad *load.AvgStat `json:"avgLoad"`

	ExtraInfo any `json:"extraInfo"`
}

func GetDiagnostics

func GetDiagnostics() Diagnostics

type Payload

type Payload struct {
	Version string      `json:"version"`
	Number  int64       `json:"number"`
	Time    int64       `json:"time"`
	Info    Diagnostics `json:"info"`
}

func GetPayload

func GetPayload() Payload

func ParsePayload

func ParsePayload(raw []byte) (Payload, error)

func (Payload) Raw

func (p Payload) Raw() ([]byte, error)

func (Payload) RawInfo

func (p Payload) RawInfo() ([]byte, error)

type Response

type Response struct {
	Valid    bool          `json:"valid"`
	Duration time.Duration `json:"duration"`
	Time     time.Time     `json:"time"`
	Number   int64         `json:"number"`
}

func ParseResponse

func ParseResponse(raw []byte) (Response, error)

func ResponseNo

func ResponseNo() Response

func ResponseYes

func ResponseYes(number int64) Response

func (Response) Raw

func (r Response) Raw() ([]byte, error)

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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