clievent

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEvent = appobs.ErrInvalidEvent
View Source
var ErrInvalidResult = errors.New("CLI command result is invalid")

Functions

func NewFallback

func NewFallback(command Command, from, to appobs.Transport, failure appobs.Failure) (appobs.Fallback, error)

func NewLaneAdopted

func NewLaneAdopted(
	command Command,
	session appobs.ProtocolSessionID,
	lane appobs.LaneIdentity,
	transport appobs.Transport,
) (appobs.LaneAdopted, error)

func NewRelayConnected

func NewRelayConnected(command Command, origin appobs.RelayOrigin) (appobs.RelayConnected, error)

func NewRelayRecovering

func NewRelayRecovering(
	command Command,
	origin appobs.RelayOrigin,
	attempt uint32,
	state appobs.RelayRecoveryState,
	failure appobs.Failure,
) (appobs.RelayRecovering, error)

func NewRelayRecoveryObservation

func NewRelayRecoveryObservation(command Command, origin appobs.RelayOrigin, attempt uint32, state appobs.RelayRecoveryState, failure appobs.Failure, details appobs.RelayRecoveryDetails) (appobs.RelayRecovering, error)

func NewWarning

func NewWarning(command Command, failure appobs.Failure) (appobs.Warning, error)

func WorkflowForCommand

func WorkflowForCommand(command Command) appobs.Workflow

Types

type Command

type Command uint8
const (
	CommandShare Command = iota + 1
	CommandGet
)

func CommandOf

func CommandOf(event Event) Command

CommandOf adds presentation context without wrapping an application fact.

func (Command) Name

func (value Command) Name() (string, bool)

func (Command) Valid

func (value Command) Valid() bool

type CommandFailed

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

func NewCommandFailed

func NewCommandFailed(command Command, exit ExitCode, failure appobs.Failure) (CommandFailed, error)

func (CommandFailed) Command

func (value CommandFailed) Command() Command

func (CommandFailed) ExitCode

func (value CommandFailed) ExitCode() ExitCode

func (CommandFailed) Failure

func (value CommandFailed) Failure() appobs.Failure

func (CommandFailed) Level

func (CommandFailed) Level() appobs.Level

func (CommandFailed) Validate

func (value CommandFailed) Validate() error

type Diagnostic

type Diagnostic struct {
	Owner  Command
	Record diagnostics.Record
}

Diagnostic is a recorder envelope, never an application event or task result.

func (Diagnostic) Command

func (v Diagnostic) Command() Command

func (Diagnostic) Level

func (Diagnostic) Level() appobs.Level

func (Diagnostic) Validate

func (v Diagnostic) Validate() error

type DriftReason

type DriftReason uint8
const (
	DriftNone DriftReason = iota
	DriftSource
)

func (DriftReason) Name

func (value DriftReason) Name() (string, bool)

type Event

type Event interface {
	Level() appobs.Level
	Validate() error
}

type ExitCode

type ExitCode uint8
const (
	ExitSuccess ExitCode = iota
	ExitFailure
	ExitUsage
	ExitNetwork
	ExitDrift
)

func (ExitCode) Name

func (value ExitCode) Name() (string, bool)

func (ExitCode) ProcessCode

func (value ExitCode) ProcessCode() (int, bool)

func (ExitCode) Valid

func (value ExitCode) Valid() bool

type NetworkSetupObserved

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

NetworkSetupObserved records why a transfer did or did not suggest setup. The run identity supplies correlation; no host-policy check occurs here.

func NewNetworkSetupObserved

func NewNetworkSetupObserved(command Command, report platformsetup.StartupReport) (NetworkSetupObserved, error)

func (NetworkSetupObserved) Command

func (v NetworkSetupObserved) Command() Command

func (NetworkSetupObserved) ConfiguredExecutable

func (v NetworkSetupObserved) ConfiguredExecutable() string

func (NetworkSetupObserved) Decision

func (v NetworkSetupObserved) Decision() string

func (NetworkSetupObserved) Executable

func (v NetworkSetupObserved) Executable() string

func (NetworkSetupObserved) Failure

func (v NetworkSetupObserved) Failure() string

func (NetworkSetupObserved) Level

func (v NetworkSetupObserved) Level() appobs.Level

func (NetworkSetupObserved) SuggestSetup

func (v NetworkSetupObserved) SuggestSetup() bool

func (NetworkSetupObserved) Validate

func (v NetworkSetupObserved) Validate() error

type ResultStatus

type ResultStatus uint8
const (
	ResultSuccess ResultStatus = iota + 1
	ResultPartial
	ResultPaused
	ResultFailed
)

func (ResultStatus) Name

func (value ResultStatus) Name() (string, bool)

func (ResultStatus) Valid

func (value ResultStatus) Valid() bool

type SharePublication

type SharePublication uint8
const (
	ShareUnpublished SharePublication = iota + 1
	SharePublished
)

func (SharePublication) Name

func (publication SharePublication) Name() (string, bool)

type ShareResult

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

func NewShareResult

func NewShareResult(spec ShareResultSpec) (ShareResult, error)

func (ShareResult) Elapsed

func (result ShareResult) Elapsed() time.Duration

func (ShareResult) ExitCode

func (result ShareResult) ExitCode() ExitCode

func (ShareResult) Failure

func (result ShareResult) Failure() (appobs.Failure, bool)

func (ShareResult) Publication

func (result ShareResult) Publication() SharePublication

func (ShareResult) StoppedCleanly

func (result ShareResult) StoppedCleanly() bool

func (ShareResult) Valid

func (result ShareResult) Valid() bool

type ShareResultSpec

type ShareResultSpec struct {
	Publication SharePublication
	ExitCode    ExitCode
	Elapsed     time.Duration
	Failure     appobs.Failure
}

type SharingStopped

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

func NewSharingStopped

func NewSharingStopped(result ShareResult) (SharingStopped, error)

func (SharingStopped) Command

func (SharingStopped) Command() Command

func (SharingStopped) Level

func (value SharingStopped) Level() appobs.Level

func (SharingStopped) Result

func (value SharingStopped) Result() ShareResult

func (SharingStopped) Validate

func (value SharingStopped) Validate() error

type TerminalEvent

type TerminalEvent interface {
	Event
	// contains filtered or unexported methods
}

type TraceIncomplete

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

func NewTraceIncomplete

func NewTraceIncomplete(
	command Command,
	cause TraceIncompleteCause,
	loss TraceLoss,
) (TraceIncomplete, error)

func (TraceIncomplete) Cause

func (value TraceIncomplete) Cause() TraceIncompleteCause

func (TraceIncomplete) Command

func (value TraceIncomplete) Command() Command

func (TraceIncomplete) Level

func (TraceIncomplete) Level() appobs.Level

func (TraceIncomplete) Loss

func (value TraceIncomplete) Loss() TraceLoss

func (TraceIncomplete) Validate

func (value TraceIncomplete) Validate() error

type TraceIncompleteCause

type TraceIncompleteCause uint8
const (
	TraceIncompleteLifecycleDrop TraceIncompleteCause = iota + 1
	TraceIncompleteWriter
	TraceIncompleteFlush
	TraceIncompleteSchemaLimit
	TraceIncompleteContractRejection
	TraceIncompleteRejectionEvidence
)

func (TraceIncompleteCause) Name

func (cause TraceIncompleteCause) Name() (string, bool)

type TraceLoss

type TraceLoss struct {
	ContractRejections uint64
	LifecycleDrops     uint64
	ProgressDrops      uint64
}

func (TraceLoss) Incomplete

func (loss TraceLoss) Incomplete() bool

type TransferResult

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

func NewTransferResult

func NewTransferResult(spec TransferResultSpec) (TransferResult, error)

func (TransferResult) CountersExact

func (result TransferResult) CountersExact() bool

func (TransferResult) Destination

func (result TransferResult) Destination() appobs.DisplayPath

func (TransferResult) DestinationAdjusted

func (result TransferResult) DestinationAdjusted() bool

func (TransferResult) DirectoryFailures

func (result TransferResult) DirectoryFailures() uint64

func (TransferResult) Drift

func (result TransferResult) Drift() DriftReason

func (TransferResult) Elapsed

func (result TransferResult) Elapsed() time.Duration

func (TransferResult) ExitCode

func (result TransferResult) ExitCode() ExitCode

func (TransferResult) Failure

func (result TransferResult) Failure() (appobs.Failure, bool)

func (TransferResult) Files

func (result TransferResult) Files() appobs.FileOutcomes

func (TransferResult) OmittedDiagnostics

func (result TransferResult) OmittedDiagnostics() uint64

func (TransferResult) PublishedBytes

func (result TransferResult) PublishedBytes() uint64

func (TransferResult) SourceOmittedEntries

func (result TransferResult) SourceOmittedEntries() uint64

func (TransferResult) Status

func (result TransferResult) Status() ResultStatus

func (TransferResult) Valid

func (result TransferResult) Valid() bool

type TransferResultSpec

type TransferResultSpec struct {
	SourceOmittedEntries uint64
	Status               ResultStatus
	ExitCode             ExitCode
	Drift                DriftReason
	Elapsed              time.Duration
	Destination          appobs.DisplayPath
	DestinationAdjusted  bool
	Files                appobs.FileOutcomes
	DirectoryFailures    uint64
	OmittedDiagnostics   uint64
	PublishedBytes       uint64
	CountersExact        bool
	Failure              appobs.Failure
}

type TransferSettled

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

func NewTransferSettled

func NewTransferSettled(result TransferResult) (TransferSettled, error)

func (TransferSettled) Command

func (TransferSettled) Command() Command

func (TransferSettled) DownloadConnectivity

func (value TransferSettled) DownloadConnectivity() (downloadmetrics.Snapshot, bool)

func (TransferSettled) Level

func (value TransferSettled) Level() appobs.Level

func (TransferSettled) Result

func (value TransferSettled) Result() TransferResult

func (TransferSettled) Validate

func (value TransferSettled) Validate() error

func (TransferSettled) WithDownloadConnectivity

func (value TransferSettled) WithDownloadConnectivity(snapshot downloadmetrics.Snapshot) (TransferSettled, error)

Jump to

Keyboard shortcuts

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