relaypipeline

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package relaypipeline is the generated RelayPipeline widget.

Edit the widget document and regenerate; edits here are overwritten.

Index

Constants

View Source
const (
	RelayPipelineName    = "RelayPipeline"
	RelayPipelineRegion  = "widget.relay-pipeline"
	RelayPipelinePalette = "fieldStation"
	RelayPipelineTitleID = "widget.relay-pipeline-title"
)

This widget's identity. The region is the only one that crosses the wire: a patch names it, so changing it is a client-visible change. The palette is a name a host resolves to values; this widget carries no colour of its own. The title id is what the widget's landmark is labelled by.

View Source
const (
	RelayPipelineEventAdvanceFieldCursor    = "cursor"
	RelayPipelineEventAdvanceFieldIngressUp = "ingress_up"
	RelayPipelineEventAdvanceFieldRelayUp   = "relay_up"
	RelayPipelineEventAdvanceFieldSinkUp    = "sink_up"
	RelayPipelineEventAdvanceFieldBacklog   = "backlog"
)

The wire field names each event carries. They are the other half of an event's contract: the widget reads these out of a delivery, and whatever produced the delivery wrote them in. Registration.Payloads carries the same names as data, for a host that fills an event it cannot name at compile time.

View Source
const (
	RelayPipelineEventAdvance = "widget.relay.advance"
)

The wire names this widget accepts. The set is exhaustive and default-deny: a name absent from the registration is refused before any reducer runs.

Variables

This section is empty.

Functions

func RelayPipelineView

func RelayPipelineView(state RelayPipelineState) templ.Component

RelayPipelineView draws the RelayPipeline widget's default live region.

func RelayPipelineViewAt

func RelayPipelineViewAt(state RelayPipelineState, region string) templ.Component

RelayPipelineViewAt draws one instance in its host-assigned live region.

Every value in it is a pure read of state and region: equal inputs render byte-identical markup: that comparison is what suppresses a patch nobody needs.

Types

type RelayPipeline

type RelayPipeline[I live.IIdentity] struct {
	// contains filtered or unexported fields
}

RelayPipeline is the generated RelayPipeline widget.

I is the HOST's identity type, threaded through and never read: a widget document names no host, no address and no credential, so nothing here can look at an identity. It is a type parameter because the SDK's contract carries one — live.Session stopped erasing the application's identity type on 2026-09-03 — and a generated widget must fit whatever host registers it.

func NewRelayPipeline

func NewRelayPipeline[I live.IIdentity]() *RelayPipeline[I]

NewRelayPipeline returns the widget a host registers, instantiated on that host's own identity type.

func NewRelayPipelineAt

func NewRelayPipelineAt[I live.IIdentity](region string) *RelayPipeline[I]

NewRelayPipelineAt gives one instance its host-assigned region. The host validates region syntax and uniqueness when assembling its live configuration.

func (*RelayPipeline[I]) Dirty

func (instance *RelayPipeline[I]) Dirty(previous RelayPipelineState, next RelayPipelineState) bool

Dirty reports whether a transition may have changed this widget's markup: the state fields its bindings, its predicates and its tick read, and no others.

func (*RelayPipeline[I]) Mount

func (instance *RelayPipeline[I]) Mount(
	ctx context.Context, session live.Session[I],
) (RelayPipelineState, []live.Effect[I], error)

Mount opens one session's copy of the widget. It schedules no effect: the streams this widget declared are the host's to open, because a widget document names no host, no address and no credential.

func (*RelayPipeline[I]) Reduce

func (instance *RelayPipeline[I]) Reduce(
	state RelayPipelineState, event live.Event,
) (RelayPipelineState, []live.Effect[I])

Reduce is the pure transition from one state to the next. It performs no I/O, reads no clock and mutates nothing it was given.

func (*RelayPipeline[I]) Register

func (instance *RelayPipeline[I]) Register() widget.Registration

Register declares this instance's definition and assigned region.

Events are the names a browser may send; Internal are the names only a declared stream delivers, which the host routes without registering.

func (*RelayPipeline[I]) Render

func (instance *RelayPipeline[I]) Render(state RelayPipelineState) templ.Component

Render draws the widget's live region. It is a pure function of state: equal state renders byte-identical markup.

func (*RelayPipeline[I]) Snapshot

func (instance *RelayPipeline[I]) Snapshot(state RelayPipelineState) widget.Snapshot

Snapshot projects state into ordered name/value pairs, in state-field declaration order.

func (*RelayPipeline[I]) Unmount

func (instance *RelayPipeline[I]) Unmount(ctx context.Context, session live.Session[I], state RelayPipelineState)

Unmount releases what the session held. This widget holds nothing.

type RelayPipelineState

type RelayPipelineState struct {
	// Cursor is the "cursor" state field, declared type counter.
	Cursor uint64

	// IngressUp is the "ingressUp" state field, declared type flag.
	IngressUp bool

	// RelayUp is the "relayUp" state field, declared type flag.
	RelayUp bool

	// SinkUp is the "sinkUp" state field, declared type flag.
	SinkUp bool

	// Backlog is the "backlog" state field, declared type count.
	Backlog int64

	// Slow is the "slow" state field, declared type flag.
	Slow bool
}

RelayPipelineState is this widget's own state, and the type argument every method below is written in. The host holds it without knowing it; nothing in this file asserts it back, because nothing in this file ever loses it.

func (RelayPipelineState) BackedUp

func (state RelayPipelineState) BackedUp() bool

BackedUp is the "backedUp" predicate.

func (RelayPipelineState) BacklogStatLabel

func (state RelayPipelineState) BacklogStatLabel() string

BacklogStatLabel is the "backlogStatLabel" label.

func (RelayPipelineState) BacklogStatText

func (state RelayPipelineState) BacklogStatText() string

BacklogStatText is the "backlogStatText" binding. The first matching clause wins and the otherwise arm is always present, so it is total.

func (RelayPipelineState) CursorStatLabel

func (state RelayPipelineState) CursorStatLabel() string

CursorStatLabel is the "cursorStatLabel" label.

func (RelayPipelineState) Flowing

func (state RelayPipelineState) Flowing() bool

Flowing is the "flowing" predicate.

func (RelayPipelineState) IngressCaptionLabel

func (state RelayPipelineState) IngressCaptionLabel() string

IngressCaptionLabel is the "ingressCaptionLabel" label.

func (RelayPipelineState) IngressCaptionText

func (state RelayPipelineState) IngressCaptionText() string

IngressCaptionText is the "ingressCaptionText" binding. The first matching clause wins and the otherwise arm is always present, so it is total.

func (RelayPipelineState) IngressLabel

func (state RelayPipelineState) IngressLabel() string

IngressLabel is the "ingressLabel" label.

func (RelayPipelineState) MotionActive

func (state RelayPipelineState) MotionActive() bool

MotionActive is this widget's compiled motion gate: everything its motion block requires, and none of what it forbids. The host's own connection status is the gate's other half and is applied by the stylesheet, so an animation cannot run against a dead connection whatever this returns.

func (RelayPipelineState) MotionActiveText

func (state RelayPipelineState) MotionActiveText() string

MotionActiveText renders the gate into the attribute the stylesheet selects on.

func (RelayPipelineState) MotionTickID

func (state RelayPipelineState) MotionTickID() string

MotionTickID is the scene's identity for one tick.

Every animation is finite and none repeats, so what starts one again is a new element: the scene carries this as its id, the tick advances, and the picture moves exactly as often as the data does.

func (RelayPipelineState) MotionTickIDAt

func (state RelayPipelineState) MotionTickIDAt(region string) string

MotionTickIDAt namespaces the scene's tick identity under its live instance.

func (RelayPipelineState) PipelineDescriptionText

func (state RelayPipelineState) PipelineDescriptionText() string

PipelineDescriptionText is the "pipelineDescriptionText" binding. The first matching clause wins and the otherwise arm is always present, so it is total.

func (RelayPipelineState) RecordLegendLabel

func (state RelayPipelineState) RecordLegendLabel() string

RecordLegendLabel is the "recordLegendLabel" label.

func (RelayPipelineState) RelayCaptionLabel

func (state RelayPipelineState) RelayCaptionLabel() string

RelayCaptionLabel is the "relayCaptionLabel" label.

func (RelayPipelineState) RelayCaptionText

func (state RelayPipelineState) RelayCaptionText() string

RelayCaptionText is the "relayCaptionText" binding. The first matching clause wins and the otherwise arm is always present, so it is total.

func (RelayPipelineState) RelayLabel

func (state RelayPipelineState) RelayLabel() string

RelayLabel is the "relayLabel" label.

func (RelayPipelineState) SceneDescriptionLabel

func (state RelayPipelineState) SceneDescriptionLabel() string

SceneDescriptionLabel is the "sceneDescriptionLabel" label.

func (RelayPipelineState) SinkCaptionLabel

func (state RelayPipelineState) SinkCaptionLabel() string

SinkCaptionLabel is the "sinkCaptionLabel" label.

func (RelayPipelineState) SinkCaptionText

func (state RelayPipelineState) SinkCaptionText() string

SinkCaptionText is the "sinkCaptionText" binding. The first matching clause wins and the otherwise arm is always present, so it is total.

func (RelayPipelineState) SinkLabel

func (state RelayPipelineState) SinkLabel() string

SinkLabel is the "sinkLabel" label.

func (RelayPipelineState) SourceLabel

func (state RelayPipelineState) SourceLabel() string

SourceLabel is the "sourceLabel" label.

func (RelayPipelineState) TitleLabel

func (state RelayPipelineState) TitleLabel() string

TitleLabel is the "titleLabel" label.

Jump to

Keyboard shortcuts

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