web

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BadRequest = 400
View Source
const NoNewData = 204
View Source
const ServerError = 500

Variables

This section is empty.

Functions

This section is empty.

Types

type SnapshotRing

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

Important assumptions: Snapshots are always added in chronological order Elements cannot be removed, only added (such that the ring is always full if ring.first > 0)

func NewSnapshotRing

func NewSnapshotRing(length int) SnapshotRing

func (SnapshotRing) FirstAfter

func (ring SnapshotRing) FirstAfter(t time.Time) (inertia.Snapshot, error)

func (*SnapshotRing) Push

func (ring *SnapshotRing) Push(state inertia.Snapshot)

type WebDataSink

type WebDataSink struct {
	Metadata inertia.SystemMetadata
	States   SnapshotRing
	// contains filtered or unexported fields
}

func New

func New(bind string, bufferlength int) *WebDataSink

func (*WebDataSink) Init

func (wv *WebDataSink) Init(meta inertia.SystemMetadata) error

func (*WebDataSink) Update

func (wv *WebDataSink) Update(state inertia.Snapshot)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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