status

package
v0.51.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const BldrDevtoolStatusObserverControllerID = "bldr/devtool/status/observer"

BldrDevtoolStatusObserverControllerID is the controller id for the observer.

Variables

View Source
var BldrDevtoolStatusObserverVersion = semver.MustParse("0.0.1")

BldrDevtoolStatusObserverVersion is the observer controller version.

Functions

func AttachManifestBuildStatus

func AttachManifestBuildStatus(
	producer *BldrDevtoolStatusProducer,
	ctrl *bldr_project_controller.Controller,
)

AttachManifestBuildStatus adapts ProjectController builder status into Bldr Devtool Status.

func AttachPluginStatus

func AttachPluginStatus(
	ctx context.Context,
	producer *BldrDevtoolStatusProducer,
	ctrl *plugin_host_scheduler.Controller,
)

AttachPluginStatus adapts PluginHost scheduler status into Bldr Devtool Status.

Types

type BldrDevtoolAttentionRow

type BldrDevtoolAttentionRow struct {
	ID       string
	Source   string
	Message  string
	Detail   string
	Severity BldrDevtoolAttentionSeverity
}

BldrDevtoolAttentionRow describes one recent attention or error item.

type BldrDevtoolAttentionSeverity

type BldrDevtoolAttentionSeverity int32

BldrDevtoolAttentionSeverity describes the urgency of an attention row.

const (
	// BldrDevtoolAttentionSeverityUnknown leaves severity unset.
	BldrDevtoolAttentionSeverityUnknown BldrDevtoolAttentionSeverity = iota
	// BldrDevtoolAttentionSeverityInfo marks informational attention.
	BldrDevtoolAttentionSeverityInfo
	// BldrDevtoolAttentionSeverityWarning marks recoverable attention.
	BldrDevtoolAttentionSeverityWarning
	// BldrDevtoolAttentionSeverityError marks blocking attention.
	BldrDevtoolAttentionSeverityError
)

func (BldrDevtoolAttentionSeverity) String

String returns the stable display value.

type BldrDevtoolCommandState

type BldrDevtoolCommandState int32

BldrDevtoolCommandState describes the high-level command lifecycle.

const (
	// BldrDevtoolCommandStateUnknown leaves command state unset.
	BldrDevtoolCommandStateUnknown BldrDevtoolCommandState = iota
	// BldrDevtoolCommandStateStarting means command startup is running.
	BldrDevtoolCommandStateStarting
	// BldrDevtoolCommandStateRunning means the command is active.
	BldrDevtoolCommandStateRunning
	// BldrDevtoolCommandStateDone means the command completed successfully.
	BldrDevtoolCommandStateDone
	// BldrDevtoolCommandStateError means the command failed.
	BldrDevtoolCommandStateError
	// BldrDevtoolCommandStateCanceled means the command was canceled.
	BldrDevtoolCommandStateCanceled
)

func (BldrDevtoolCommandState) String

func (s BldrDevtoolCommandState) String() string

String returns the stable display value.

type BldrDevtoolCommandStatus

type BldrDevtoolCommandStatus struct {
	Name    string
	State   BldrDevtoolCommandState
	Summary string
	Error   string
	LogFile string
}

BldrDevtoolCommandStatus describes the active bldr command.

func (BldrDevtoolCommandStatus) IsTerminal

func (s BldrDevtoolCommandStatus) IsTerminal() bool

IsTerminal returns true when the command cannot make more progress.

type BldrDevtoolControllerRow

type BldrDevtoolControllerRow struct {
	ID           string
	ControllerID string
	Kind         string
	State        BldrDevtoolControllerState
	Summary      string
	Error        string
}

BldrDevtoolControllerRow describes one controller load or exec directive row.

type BldrDevtoolControllerState

type BldrDevtoolControllerState int32

BldrDevtoolControllerState describes controller load and exec status.

const (
	// BldrDevtoolControllerStateUnknown leaves controller state unset.
	BldrDevtoolControllerStateUnknown BldrDevtoolControllerState = iota
	// BldrDevtoolControllerStateRequested means the controller has been requested.
	BldrDevtoolControllerStateRequested
	// BldrDevtoolControllerStateRunning means the controller is running.
	BldrDevtoolControllerStateRunning
	// BldrDevtoolControllerStateIdle means the directive is idle without a running controller.
	BldrDevtoolControllerStateIdle
	// BldrDevtoolControllerStateError means controller load or execution failed.
	BldrDevtoolControllerStateError
)

func (BldrDevtoolControllerState) String

String returns the stable display value.

type BldrDevtoolManifestBuildRow

type BldrDevtoolManifestBuildRow struct {
	ID                      string
	BuildTargets            string
	ManifestID              string
	PlatformID              string
	TargetPlatformIDs       string
	BuildType               string
	RemoteID                string
	State                   BldrDevtoolManifestState
	CacheHit                bool
	FullRebuild             bool
	HotRebuild              bool
	WatchedFileCount        int
	DependencyRebuildReason string
	Summary                 string
	Error                   string
}

BldrDevtoolManifestBuildRow describes one manifest build status row.

type BldrDevtoolManifestFetchRow

type BldrDevtoolManifestFetchRow struct {
	ID                  string
	ManifestID          string
	PlatformID          string
	BuildType           string
	RemoteID            string
	State               BldrDevtoolManifestState
	ReadyRefCount       int
	ReadyRefs           string
	LocalBuildIDs       string
	BlockedOnLocalBuild bool
	Summary             string
	Error               string
}

BldrDevtoolManifestFetchRow describes one manifest fetch status row.

type BldrDevtoolManifestState

type BldrDevtoolManifestState int32

BldrDevtoolManifestState describes manifest fetch and build progress.

const (
	// BldrDevtoolManifestStateUnknown leaves manifest state unset.
	BldrDevtoolManifestStateUnknown BldrDevtoolManifestState = iota
	// BldrDevtoolManifestStateQueued means work is waiting to start.
	BldrDevtoolManifestStateQueued
	// BldrDevtoolManifestStateRunning means work is active.
	BldrDevtoolManifestStateRunning
	// BldrDevtoolManifestStateReady means the manifest is available.
	BldrDevtoolManifestStateReady
	// BldrDevtoolManifestStateError means the work failed.
	BldrDevtoolManifestStateError
	// BldrDevtoolManifestStateCanceled means the work was canceled.
	BldrDevtoolManifestStateCanceled
)

func (BldrDevtoolManifestState) String

func (s BldrDevtoolManifestState) String() string

String returns the stable display value.

type BldrDevtoolPluginRow

type BldrDevtoolPluginRow struct {
	ID          string
	PluginID    string
	InstanceKey string
	State       BldrDevtoolPluginState
	Summary     string
	Error       string
	LastErrorAt string
}

BldrDevtoolPluginRow describes one plugin instance row.

type BldrDevtoolPluginState

type BldrDevtoolPluginState int32

BldrDevtoolPluginState describes plugin status.

const (
	// BldrDevtoolPluginStateUnknown leaves plugin state unset.
	BldrDevtoolPluginStateUnknown BldrDevtoolPluginState = iota
	// BldrDevtoolPluginStateRequested means the plugin has been requested.
	BldrDevtoolPluginStateRequested
	// BldrDevtoolPluginStateRunning means the plugin is running.
	BldrDevtoolPluginStateRunning
	// BldrDevtoolPluginStateErrored means the plugin failed.
	BldrDevtoolPluginStateErrored
	// BldrDevtoolPluginStateError is kept as an alias for older call sites.
	BldrDevtoolPluginStateError = BldrDevtoolPluginStateErrored
)

func (BldrDevtoolPluginState) String

func (s BldrDevtoolPluginState) String() string

String returns the stable display value.

type BldrDevtoolStatus

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

BldrDevtoolStatus is an immutable snapshot of current bldr devtool status.

func EmptyBldrDevtoolStatus

func EmptyBldrDevtoolStatus() *BldrDevtoolStatus

EmptyBldrDevtoolStatus creates an empty status snapshot.

func NewBldrDevtoolStatus

func NewBldrDevtoolStatus(
	command BldrDevtoolCommandStatus,
	manifestFetchRows []BldrDevtoolManifestFetchRow,
	manifestBuildRows []BldrDevtoolManifestBuildRow,
	pluginRows []BldrDevtoolPluginRow,
	controllerRows []BldrDevtoolControllerRow,
	attentionRows []BldrDevtoolAttentionRow,
) *BldrDevtoolStatus

NewBldrDevtoolStatus creates an immutable status snapshot.

func (*BldrDevtoolStatus) Clone

Clone returns a copy of the snapshot.

func (*BldrDevtoolStatus) GetAttentionRows

func (s *BldrDevtoolStatus) GetAttentionRows() []BldrDevtoolAttentionRow

GetAttentionRows returns recent attention and error rows.

func (*BldrDevtoolStatus) GetCommand

GetCommand returns the command status.

func (*BldrDevtoolStatus) GetControllerRows

func (s *BldrDevtoolStatus) GetControllerRows() []BldrDevtoolControllerRow

GetControllerRows returns controller load and exec rows.

func (*BldrDevtoolStatus) GetManifestBuildRows

func (s *BldrDevtoolStatus) GetManifestBuildRows() []BldrDevtoolManifestBuildRow

GetManifestBuildRows returns manifest build rows.

func (*BldrDevtoolStatus) GetManifestFetchRows

func (s *BldrDevtoolStatus) GetManifestFetchRows() []BldrDevtoolManifestFetchRow

GetManifestFetchRows returns manifest fetch rows.

func (*BldrDevtoolStatus) GetPluginRows

func (s *BldrDevtoolStatus) GetPluginRows() []BldrDevtoolPluginRow

GetPluginRows returns plugin rows.

func (*BldrDevtoolStatus) WithAttentionRows

func (s *BldrDevtoolStatus) WithAttentionRows(rows []BldrDevtoolAttentionRow) *BldrDevtoolStatus

WithAttentionRows returns a copy with recent attention and error rows replaced.

func (*BldrDevtoolStatus) WithCommand

WithCommand returns a copy with command status replaced.

func (*BldrDevtoolStatus) WithControllerRows

func (s *BldrDevtoolStatus) WithControllerRows(rows []BldrDevtoolControllerRow) *BldrDevtoolStatus

WithControllerRows returns a copy with controller rows replaced.

func (*BldrDevtoolStatus) WithManifestBuildRows

func (s *BldrDevtoolStatus) WithManifestBuildRows(rows []BldrDevtoolManifestBuildRow) *BldrDevtoolStatus

WithManifestBuildRows returns a copy with manifest build rows replaced.

func (*BldrDevtoolStatus) WithManifestFetchRows

func (s *BldrDevtoolStatus) WithManifestFetchRows(rows []BldrDevtoolManifestFetchRow) *BldrDevtoolStatus

WithManifestFetchRows returns a copy with manifest fetch rows replaced.

func (*BldrDevtoolStatus) WithPluginRows

func (s *BldrDevtoolStatus) WithPluginRows(rows []BldrDevtoolPluginRow) *BldrDevtoolStatus

WithPluginRows returns a copy with plugin rows replaced.

type BldrDevtoolStatusObserver

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

BldrDevtoolStatusObserver observes ControllerBus directives and publishes status.

func NewBldrDevtoolStatusObserver

func NewBldrDevtoolStatusObserver(
	b bus.Bus,
	producer *BldrDevtoolStatusProducer,
) *BldrDevtoolStatusObserver

NewBldrDevtoolStatusObserver constructs a Bldr Devtool Status observer.

func (*BldrDevtoolStatusObserver) Close

func (o *BldrDevtoolStatusObserver) Close() error

Close releases observer callbacks.

func (*BldrDevtoolStatusObserver) Execute

Execute observes initial directives and add/remove broadcasts.

func (*BldrDevtoolStatusObserver) GetControllerInfo

func (o *BldrDevtoolStatusObserver) GetControllerInfo() *controller.Info

GetControllerInfo returns information about the controller.

func (*BldrDevtoolStatusObserver) GetStatusProducer

func (o *BldrDevtoolStatusObserver) GetStatusProducer() *BldrDevtoolStatusProducer

GetStatusProducer returns the status producer.

func (*BldrDevtoolStatusObserver) HandleDirective

HandleDirective does not resolve directives.

type BldrDevtoolStatusProducer

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

BldrDevtoolStatusProducer publishes immutable BldrDevtoolStatus snapshots.

func NewBldrDevtoolStatusProducer

func NewBldrDevtoolStatusProducer(initial *BldrDevtoolStatus) *BldrDevtoolStatusProducer

NewBldrDevtoolStatusProducer creates a BldrDevtoolStatusProducer.

func (*BldrDevtoolStatusProducer) GetStatus

GetStatus returns the current immutable snapshot.

func (*BldrDevtoolStatusProducer) GetStatusCtr

GetStatusCtr returns the watchable status container.

func (*BldrDevtoolStatusProducer) SetStatus

func (p *BldrDevtoolStatusProducer) SetStatus(snapshot *BldrDevtoolStatus)

SetStatus publishes the next immutable snapshot.

func (*BldrDevtoolStatusProducer) UpdateStatus

func (p *BldrDevtoolStatusProducer) UpdateStatus(
	update func(current *BldrDevtoolStatus) *BldrDevtoolStatus,
) *BldrDevtoolStatus

UpdateStatus atomically builds and publishes the next immutable snapshot.

Jump to

Keyboard shortcuts

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