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

sharedobjecthealth

package
v0.57.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneOrLoading

func CloneOrLoading(health *sobject.SharedObjectHealth) *sobject.SharedObjectHealth

CloneOrLoading clones non-nil health and replaces nil with loading.

func Error

func Error(err error) *sobject.SharedObjectHealth

Error returns SharedObject health for an error.

func Loading

func Loading() *sobject.SharedObjectHealth

Loading returns the common SharedObject loading health.

func Ready

func Ready() *sobject.SharedObjectHealth

Ready returns the common SharedObject ready health.

func SnapshotState

SnapshotState returns the current state-derived health snapshot.

func SnapshotWatchable

func SnapshotWatchable(
	healthCtr ccontainer.Watchable[*sobject.SharedObjectHealth],
) *sobject.SharedObjectHealth

SnapshotWatchable returns the current watchable health snapshot.

func StreamState

func StreamState(
	ctx context.Context,
	sender Sender,
	stateCtr ccontainer.Watchable[sobject.SharedObjectStateSnapshot],
) error

StreamState streams ready/loading health derived from SharedObject state.

func StreamWatchable

func StreamWatchable(
	ctx context.Context,
	sender Sender,
	healthCtr ccontainer.Watchable[*sobject.SharedObjectHealth],
) error

StreamWatchable streams SharedObject health from a watchable.

func Wait

func Wait(ctx context.Context, sender Sender, health *sobject.SharedObjectHealth) error

Wait sends loading, sends one health snapshot, and waits for cancellation.

Types

type Sender

type Sender interface {
	SendHealth(*sobject.SharedObjectHealth) error
}

Sender sends SharedObject health snapshots.

Jump to

Keyboard shortcuts

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