Documentation
¶
Overview ¶
Package engine is WindShare's native application boundary. An Engine owns aggregate resource limits while each task owns its connections, selected source or output, cancellation, and final settlement.
ResolveReceiveLink accepts a URL and optional separate key before task admission. Clients handle ErrReceiveKeyRequired with their own input UI; link validation and key-conflict decisions are shared by native and RPC callers.
StartShare and StartReceive return tasks whose bounded observation streams never control execution. Wait returns the durable final result only after the workflow has stopped producers and released resources. Cancel stops one task; ShareTask.StopShare explicitly stops a share; Close stops all tasks and closes the instance's capacity owner.
TaskResult retains the authoritative Settlement and diagnostic causes. Share and receive streams expose its normalized EngineTaskObserved fact once, using engine/observation/wire for serialization. Value contains workflow details; errors.As can recover a structured ReceiveFailure from Err even without a low-level cause. A nil Wait error means the result was retrieved, not that the operation succeeded. StopReason records intent independently of the outcome.
Observations expose typed product state through engine/observation. Optional request Diagnostics sinks carry source-owned records separately, with engine, task and workflow scope. Hosts drain and close their bounded diagnostic stream after tasks stop; overflow or a closed sink never changes task settlement. Diagnostic names and attributes do not extend the product wire contract. Clients own formatting and exit codes; injected ports keep native objects out of the application API.
ShareTask.Ready retains first service readiness: at least one relay registered and local session admission started. Clients own capability presentation and stop the share if presentation fails. Directory prefetch follows readiness in the background; relay availability and active sessions evolve independently.
Output and recovery ports are platform-neutral; hosts assemble osfs through adapters/filesystem. Provider-owned diagnostic events retain native detail.
InspectRecovery returns listed operation identities after releasing destination leases. RecoveryInventory.Discard reacquires output authority and rechecks those identities before changing owned state, so a prompt holds no destination lease.
Index ¶
- Constants
- Variables
- func DescribeFailure(cause error) (appobs.Failure, bool)
- func DescribeFileOutcomes(value transfer.FileOutcomeSummary) appobs.FileOutcomes
- func DescribeProgress(operation receivecontract.OperationID, job transfer.TransferJobID, ...) (appobs.TransferProgress, error)
- func DescribeProgressSnapshot(value transfer.ReceiveProgressSnapshot, visible bool) (appobs.ProgressSnapshot, error)
- func DescribeSharingSubject(summary liveshare.SelectedRootSummary) (appobs.SharingSubjectSelected, error)
- func NormalizeRelayOrigin(raw string) (appobs.RelayOrigin, error)
- func ObservationLossReason(cause error) appobs.ObserverLossReason
- func ObservationRejection(cause error) appobs.ObservationRejection
- func ResolveReceiveLink(input ReceiveLinkInput) (link.Link, error)
- type Config
- type ConnectivityPolicy
- type Engine
- func (engine *Engine) Accounts() *account.Service
- func (engine *Engine) CancelRelaySetup(ctx context.Context, address string) error
- func (engine *Engine) Close(ctx context.Context) error
- func (engine *Engine) ConfigureTURN(settings turn.Settings) error
- func (application *Engine) InspectRecovery(ctx context.Context, authority RecoveryAuthority) (*RecoveryInventory, error)
- func (engine *Engine) NetworkUnavailability() *NetworkUnavailableError
- func (engine *Engine) QueryTURNUsage(ctx context.Context, account string, firstDate, lastDate time.Time) (turn.Usage, error)
- func (engine *Engine) StartReceive(ctx context.Context, request ReceiveRequest) (*ReceiveTask, error)
- func (engine *Engine) StartRelaySetup(ctx context.Context, request RelaySetupRequest) (*Task[RelaySetupResult], error)
- func (engine *Engine) StartShare(ctx context.Context, request ShareRequest) (*ShareTask, error)
- func (engine *Engine) TURNStatus() []turn.Status
- type Event
- type FailureClass
- type LifecycleObservation
- type NetworkBlockingReason
- type NetworkUnavailableError
- type Observation
- type Outcome
- type OutputAuthority
- type OutputConfig
- type OutputFactory
- type OutputFactoryFunc
- type OutputLookup
- type OutputLookupKind
- type OutputMode
- type OutputOperation
- type OutputReservation
- type PreparedShare
- type ReceiveAdmissionObserved
- type ReceiveAdmissionTerminalOwner
- type ReceiveAdmissionTrigger
- type ReceiveClock
- type ReceiveConnection
- type ReceiveContentPath
- type ReceiveDependencies
- type ReceiveDialRequest
- type ReceiveFailure
- type ReceiveFailureCode
- type ReceiveGenerationChanged
- type ReceiveLinkInput
- type ReceiveLocalFailure
- type ReceiveLocalStopReason
- type ReceiveOutputAdmission
- type ReceivePause
- type ReceivePeerAttempt
- type ReceivePeerDisposition
- type ReceivePeerOutcome
- type ReceivePeerStarter
- type ReceiveProgressRetention
- type ReceiveRecoveryAction
- type ReceiveRecoveryOutcome
- type ReceiveRecoveryReason
- type ReceiveRecoverySettings
- type ReceiveRequest
- type ReceiveResult
- type ReceiveSettlementInput
- type ReceiveTask
- type ReceiveTicker
- type RecoveryAttentionReason
- type RecoveryAuthority
- type RecoveryBlockedItem
- type RecoveryBlockedReason
- type RecoveryClock
- type RecoveryDiscardReport
- type RecoveryDiscardResult
- type RecoveryDiscardStatus
- type RecoveryFailure
- type RecoveryFailureDetail
- type RecoveryFailureKind
- type RecoveryInventory
- func (inventory *RecoveryInventory) CheckDiscard(id receivecontract.OperationID) *RecoveryFailure
- func (inventory *RecoveryInventory) Discard(ctx context.Context, id receivecontract.OperationID) RecoveryDiscardResult
- func (inventory *RecoveryInventory) DiscardRestriction() *RecoveryFailure
- func (inventory *RecoveryInventory) Observations() <-chan Observation
- func (inventory *RecoveryInventory) Snapshot() (RecoverySnapshot, error)
- type RecoveryObservation
- type RecoveryOperation
- type RecoveryOperationState
- type RecoveryPhase
- type RecoverySnapshot
- type RelaySetupProgress
- type RelaySetupRequest
- type RelaySetupResult
- type ShareAuthorization
- type ShareAuthorizationKind
- type ShareDependencies
- type SharePeers
- type ShareReady
- type ShareRelayCandidate
- type ShareRelays
- type ShareRequest
- type ShareResult
- type ShareSessionFactory
- type ShareSnapshot
- type ShareStartupState
- type ShareTask
- type StopReason
- type Task
- func (current *Task[T]) Cancel()
- func (current *Task[T]) Changes() <-chan struct{}
- func (current *Task[T]) Done() <-chan struct{}
- func (current *Task[T]) ID() TaskID
- func (current *Task[T]) Observations() <-chan Observation
- func (current *Task[T]) State() TaskState
- func (current *Task[T]) Wait(ctx context.Context) (TaskResult[T], error)
- type TaskCompletion
- type TaskID
- type TaskResult
- type TaskSettlement
- type TaskState
- type UnreleasedResourcesError
Constants ¶
const ( DefaultCleanupTimeout = 20 * time.Second DefaultObservationCapacity observationstream.Capacity = 256 )
const ( NetworkUnprovisioned = networkdirectory.Unprovisioned NetworkInvalidConfiguration = networkdirectory.InvalidConfiguration NetworkTrustStateUnreadable = networkdirectory.TrustStateUnreadable NetworkTrustStateInvalid = networkdirectory.TrustStateInvalid NetworkTrustStateUnwritable = networkdirectory.TrustStateUnwritable NetworkNoRelayCandidates = networkruntime.NoRelayCandidates )
const ( ReceiveRecoveryExit = receive.RecoveryExit ReceiveRecoveryRetry = receive.RecoveryRetry ReceiveRecoveryDiscard = receive.RecoveryDiscard ReceiveRecoveryTransferFailure = receive.RecoveryTransferFailure ReceiveRecoveryCollision = receive.RecoveryCollision ReceiveRecoveryOwnershipUnknown = receive.RecoveryOwnershipUnknown ReceiveRecoveryRevisionChanged = receive.RecoveryRevisionChanged ReceiveRecoverySelectionMissing = receive.RecoverySelectionMissing ReceiveRecoverySourceOmitted = receive.RecoverySourceOmitted ReceiveRecoveryInvalidRequest = receive.RecoveryInvalidRequest ReceiveRecoveryNeedsInspection = receive.RecoveryNeedsInspection ReceiveRetentionNone = receive.RetentionNone ReceiveRetentionCheckpoints = receive.RetentionCheckpoints ReceiveRetentionLiveReleased = receive.RetentionLiveReleased ReceiveRetentionDiscarded = receive.RetentionDiscarded )
const ( ReceiveCreateOrResume = receive.OutputCreateOrResume ReceiveResumeExisting = receive.OutputResumeExisting ReceiveRedownload = receive.OutputRedownload )
const ( ConnectivityAuto = receive.ConnectivityAuto ConnectivityRelayOnly = receive.ConnectivityRelayOnly ConnectivityP2POnly = receive.ConnectivityP2POnly ReceivePeerFallbackAllowed = receive.PeerFallbackAllowed ReceivePeerSessionUnsafe = receive.PeerSessionUnsafe ReceivePeerLocalStop = receive.PeerLocalStop OutputResumable = receive.OutputResumable OutputLiveOnly = receive.OutputLiveOnly OutputLookupCreateReady = receive.OutputLookupCreateReady OutputLookupNotFound = receive.OutputLookupNotFound OutputLookupReopened = receive.OutputLookupReopened OutputLookupAlreadyRunning = receive.OutputLookupAlreadyRunning OutputLookupNeedsAttention = receive.OutputLookupNeedsAttention OutputLookupAmbiguous = receive.OutputLookupAmbiguous ReceiveLocalFailureNone = receive.LocalFailureNone ReceiveLocalSelectionMissing = receive.LocalSelectionMissing ReceiveLocalRevisionConflict = receive.LocalRevisionConflict ReceiveLocalCheckpointInvalid = receive.LocalCheckpointInvalid ReceiveLocalOwnedObjectUnknown = receive.LocalOwnedObjectUnknown ReceiveLocalDestinationCollision = receive.LocalDestinationCollision ReceiveLocalSourceOmitted = receive.LocalSourceOmitted )
const ( ReceiveFailureInvalidInput = receive.FailureInvalidInput ReceiveFailureOutputContract = receive.FailureOutputContract ReceiveFailureOutputOperationAlreadyRunning = receive.FailureOutputOperationAlreadyRunning ReceiveFailureOutputNeedsAttention = receive.FailureOutputNeedsAttention ReceiveFailureOutputOwnership = receive.FailureOutputOwnership ReceiveFailureRetainedOutputMissing = receive.FailureRetainedOutputMissing ReceiveFailurePeerConfiguration = receive.FailurePeerConfiguration ReceiveFailurePeerNegotiation = receive.FailurePeerNegotiation ReceiveFailurePeerProtocol = receive.FailurePeerProtocol ReceiveFailurePeerSignaling = receive.FailurePeerSignaling ReceiveFailurePeerStopped = receive.FailurePeerStopped ReceiveLocalStopNone = receive.ReceiverLocalStopNone ReceiveLocalStopCaller = receive.ReceiverLocalStopCaller ReceiveLocalStopOutputAdmission = receive.ReceiverLocalStopOutputAdmission ReceiveLocalStopRuntimeSessionFailure = receive.ReceiverLocalStopRuntimeSessionFailure ReceiveLocalStopNormalCompletion = receive.ReceiverLocalStopNormalCompletion ReceiveContentPathRelay = receive.ContentPathRelay ReceiveContentPathDirect = receive.ContentPathDirect ReceiveContentPathDirectAndRelay = receive.ContentPathDirectAndRelay ReceiveObservationRelay = receive.ObservationRelay ReceiveObservationWebRTC = receive.ObservationWebRTC ReceiveObservationLane = receive.ObservationLane ReceiveObservationNative = receive.ObservationNative ReceiveObservationProtocol = receive.ObservationProtocol ReceiveObservationPeerTermination = receive.ObservationPeerTermination ReceiveObservationPeerDiagnostic = receive.ObservationPeerDiagnostic )
const ( RecoveryInspectStarted = recovery.InspectStarted RecoveryInspectCompleted = recovery.InspectCompleted RecoveryDiscardStarted = recovery.DiscardStarted RecoveryDiscardCompleted = recovery.DiscardCompleted RecoveryIncomplete = recovery.OperationIncomplete RecoveryResumable = recovery.OperationResumable RecoveryCleanupPending = recovery.OperationCleanupPending RecoveryNeedsAttention = recovery.OperationNeedsAttention RecoveryBlockedPublicationUnknown = recovery.BlockedPublicationUnknown RecoveryBlockedCheckpointInvalid = recovery.BlockedCheckpointInvalid RecoveryBlockedOwnedObjectUnknown = recovery.BlockedOwnedObjectUnknown RecoveryBlockedRevisionConflict = recovery.BlockedRevisionConflict RecoveryAttentionNone = recovery.AttentionNone RecoveryAttentionDestination = recovery.AttentionDestination RecoveryAttentionRegistry = recovery.AttentionRegistry RecoveryAttentionLease = recovery.AttentionLease RecoveryAttentionOperation = recovery.AttentionOperation RecoveryAttentionCleanup = recovery.AttentionCleanup RecoveryDiscarded = recovery.Discarded RecoveryDiscardCleanupPending = recovery.DiscardCleanupPending RecoveryDiscardNeedsAttention = recovery.DiscardNeedsAttention RecoveryFailureNeedsAttention = recovery.FailureNeedsAttention RecoveryFailureBusy = recovery.FailureBusy RecoveryFailureChanged = recovery.FailureChanged RecoveryFailureCancelled = recovery.FailureCancelled )
const ( TaskRunning = task.Running TaskStopping = task.Stopping TaskFinished = task.Finished NoStop = task.NoStop Cancelled = task.Cancelled ApplicationClosed = task.ApplicationClosed OutcomeSuccess = task.OutcomeSuccess OutcomePartial = task.OutcomePartial OutcomePaused = task.OutcomePaused OutcomeCancelled = task.OutcomeCancelled OutcomeStopped = task.OutcomeStopped OutcomeFailed = task.OutcomeFailed FailureNone = task.FailureNone FailureLocal = task.FailureLocal FailureNetwork = task.FailureNetwork FailureUsage = task.FailureUsage FailureSourceDrift = task.FailureSourceDrift )
Variables ¶
var ( ErrInvalidReceiveLink = errors.New("invalid receive link") ErrReceiveKeyRequired = errors.New("receive link requires a key") ErrReceiveKeyConflict = errors.New("receive link keys conflict") ErrUnsupportedReceiveSuite = errors.New("unsupported receive link suite") )
var ErrClosed = errors.New("engine is closed")
var ErrInvalidConnectivityPolicy = receive.ErrInvalidConnectivityPolicy
var ErrInvalidReceiveResult = receive.ErrInvalidResult
var ErrInvalidTaskSettlement = task.ErrInvalidSettlement
var ErrRecoveryBusy = recovery.ErrBusy
var ErrRecoveryContract = recovery.ErrContract
Functions ¶
func DescribeFailure ¶
DescribeFailure also serves adapter-owned failures, such as opening a local output or publishing a link. Task results already carry this normalized fact.
func DescribeFileOutcomes ¶
func DescribeFileOutcomes(value transfer.FileOutcomeSummary) appobs.FileOutcomes
func DescribeProgress ¶
func DescribeProgress(operation receivecontract.OperationID, job transfer.TransferJobID, snapshot transfer.ReceiveProgressSnapshot, capacityVisible bool) (appobs.TransferProgress, error)
func DescribeProgressSnapshot ¶
func DescribeProgressSnapshot(value transfer.ReceiveProgressSnapshot, visible bool) (appobs.ProgressSnapshot, error)
func DescribeSharingSubject ¶
func DescribeSharingSubject(summary liveshare.SelectedRootSummary) (appobs.SharingSubjectSelected, error)
func NormalizeRelayOrigin ¶
func NormalizeRelayOrigin(raw string) (appobs.RelayOrigin, error)
func ObservationLossReason ¶
func ObservationLossReason(cause error) appobs.ObserverLossReason
func ObservationRejection ¶
func ObservationRejection(cause error) appobs.ObservationRejection
func ResolveReceiveLink ¶
func ResolveReceiveLink(input ReceiveLinkInput) (link.Link, error)
ResolveReceiveLink performs no I/O: clients can ask for a missing key before creating a task or acquiring output authority. Protocol causes remain available through errors.Is for diagnostics.
Types ¶
type Config ¶
type Config struct {
Network *networkconfig.Config
TURN turn.Settings
TURNDependencies turn.Dependencies
RelaySetup relaysetup.Dependencies
Now func() time.Time
Random io.Reader
CleanupTimeout time.Duration
ObservationCapacity observationstream.Capacity
RevisionCapacity revisioncapacity.ProcessConfig
CatalogLimits catalog.BudgetLimits
CacheBytes uint64
ReceiveCapacity liveshare.ReceiveCapacityLimits
Receive ReceiveDependencies
}
type ConnectivityPolicy ¶
type ConnectivityPolicy = receive.ConnectivityPolicy
func ParseConnectivityPolicy ¶
func ParseConnectivityPolicy(value string) (ConnectivityPolicy, error)
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine owns aggregate capacity across its native operations, independently of other Engines in the process. Once Close begins, task admission stays closed even if a caller stops waiting for shutdown.
func (*Engine) Accounts ¶
Accounts is shared by all official-node registrations owned by this engine. Existing relay registrations keep their original attribution after login.
func (*Engine) CancelRelaySetup ¶
func (*Engine) ConfigureTURN ¶
ConfigureTURN atomically publishes manual accounts and managed deployment settings without contacting issuers or resetting Engine-lifetime budgets.
func (*Engine) InspectRecovery ¶
func (application *Engine) InspectRecovery(ctx context.Context, authority RecoveryAuthority) (*RecoveryInventory, error)
func (*Engine) NetworkUnavailability ¶
func (engine *Engine) NetworkUnavailability() *NetworkUnavailableError
NetworkUnavailability reports the default network's current blocking reason and permitted retry time. It neither starts maintenance nor judges explicit relays, which remain independent of the built-in network.
func (*Engine) QueryTURNUsage ¶
func (*Engine) StartReceive ¶
func (engine *Engine) StartReceive(ctx context.Context, request ReceiveRequest) (*ReceiveTask, error)
func (*Engine) StartRelaySetup ¶
func (engine *Engine) StartRelaySetup(ctx context.Context, request RelaySetupRequest) (*Task[RelaySetupResult], error)
func (*Engine) StartShare ¶
func (*Engine) TURNStatus ¶
type FailureClass ¶
type FailureClass = task.FailureClass
type LifecycleObservation ¶
LifecycleObservation is retained for management tasks without a transfer workflow.
type NetworkBlockingReason ¶
type NetworkBlockingReason = networkdirectory.BlockingReason
type NetworkUnavailableError ¶
type NetworkUnavailableError = networkdirectory.UnavailableError
type Observation ¶
type Observation = task.Observation
type OutputAuthority ¶
type OutputAuthority = receive.OutputAuthority
type OutputConfig ¶
type OutputConfig = receive.OutputConfig
type OutputFactory ¶
type OutputFactory = receive.OutputFactory
type OutputFactoryFunc ¶
type OutputFactoryFunc = receive.OutputFactoryFunc
type OutputLookup ¶
type OutputLookup = receive.OutputLookup
type OutputLookupKind ¶
type OutputLookupKind = receive.OutputLookupKind
type OutputMode ¶
type OutputMode = receive.OutputMode
type OutputOperation ¶
type OutputOperation = receive.OutputOperation
type OutputReservation ¶
type OutputReservation = receive.OutputReservation
type PreparedShare ¶
type ReceiveAdmissionObserved ¶
type ReceiveAdmissionObserved = receive.AdmissionObserved
type ReceiveAdmissionTerminalOwner ¶
type ReceiveAdmissionTerminalOwner = receive.AdmissionTerminalOwner
type ReceiveAdmissionTrigger ¶
type ReceiveAdmissionTrigger = receive.AdmissionTrigger
type ReceiveClock ¶
type ReceiveConnection ¶
type ReceiveConnection interface {
Descriptor() []byte
Channel() protocolsession.FrameChannel
Done() <-chan struct{}
Err() error
Close() error
}
ReceiveConnection transfers one authenticated relay connection's ownership to the task.
type ReceiveContentPath ¶
type ReceiveContentPath = receive.ContentPath
type ReceiveDependencies ¶
type ReceiveDependencies struct {
Clock ReceiveClock
ReceiverDial func(context.Context, ReceiveDialRequest) (ReceiveConnection, error)
Recovery ReceiveRecoverySettings
PeerFactory func() (ReceivePeerStarter, error)
}
type ReceiveDialRequest ¶
type ReceiveFailure ¶
type ReceiveFailureCode ¶
type ReceiveFailureCode = receive.FailureCode
type ReceiveGenerationChanged ¶
type ReceiveGenerationChanged = receive.GenerationChanged
type ReceiveLinkInput ¶
ReceiveLinkInput keeps the separate key explicit so it cannot silently override a different key embedded in the URL.
type ReceiveLocalFailure ¶
type ReceiveLocalFailure = receive.LocalFailure
type ReceiveLocalStopReason ¶
type ReceiveLocalStopReason = receive.ReceiverLocalStopReason
type ReceiveOutputAdmission ¶
type ReceiveOutputAdmission = receive.OutputAdmission
type ReceivePause ¶
type ReceivePeerAttempt ¶
type ReceivePeerAttempt = receive.PeerAttempt
type ReceivePeerDisposition ¶
type ReceivePeerDisposition = receive.PeerDisposition
type ReceivePeerOutcome ¶
type ReceivePeerOutcome = receive.PeerOutcome
func NewReceivePeerOutcome ¶
func NewReceivePeerOutcome(disposition ReceivePeerDisposition, cause error) ReceivePeerOutcome
type ReceivePeerStarter ¶
type ReceivePeerStarter = receive.PeerStarter
type ReceiveProgressRetention ¶
type ReceiveProgressRetention = receive.ProgressRetention
type ReceiveRecoveryAction ¶
type ReceiveRecoveryAction = receive.RecoveryAction
type ReceiveRecoveryOutcome ¶
type ReceiveRecoveryOutcome = receive.RecoveryOutcome
type ReceiveRecoveryReason ¶
type ReceiveRecoveryReason = receive.RecoveryReason
type ReceiveRecoverySettings ¶
type ReceiveRequest ¶
type ReceiveResult ¶
type ReceiveSettlementInput ¶
type ReceiveSettlementInput = receive.SettlementInput
type ReceiveTask ¶
type ReceiveTask struct{ *Task[ReceiveResult] }
type ReceiveTicker ¶
type RecoveryAttentionReason ¶
type RecoveryAttentionReason = recovery.AttentionReason
type RecoveryAuthority ¶
type RecoveryBlockedItem ¶
type RecoveryBlockedItem = recovery.BlockedItem
type RecoveryBlockedReason ¶
type RecoveryBlockedReason = recovery.BlockedReason
type RecoveryClock ¶
type RecoveryDiscardReport ¶
type RecoveryDiscardReport = recovery.DiscardReport
type RecoveryDiscardResult ¶
type RecoveryDiscardResult = recovery.DiscardResult
type RecoveryDiscardStatus ¶
type RecoveryDiscardStatus = recovery.DiscardStatus
type RecoveryFailure ¶
func RecoveryDestinationFailure ¶
func RecoveryDestinationFailure(err error) *RecoveryFailure
type RecoveryFailureDetail ¶
type RecoveryFailureDetail = recovery.FailureDetail
type RecoveryFailureKind ¶
type RecoveryFailureKind = recovery.FailureKind
type RecoveryInventory ¶
type RecoveryInventory struct {
// contains filtered or unexported fields
}
RecoveryInventory retains only listed identity evidence. The destination is reacquired for each discard, so a prompt never holds a filesystem lease.
func (*RecoveryInventory) CheckDiscard ¶
func (inventory *RecoveryInventory) CheckDiscard(id receivecontract.OperationID) *RecoveryFailure
func (*RecoveryInventory) Discard ¶
func (inventory *RecoveryInventory) Discard(ctx context.Context, id receivecontract.OperationID) RecoveryDiscardResult
func (*RecoveryInventory) DiscardRestriction ¶
func (inventory *RecoveryInventory) DiscardRestriction() *RecoveryFailure
func (*RecoveryInventory) Observations ¶
func (inventory *RecoveryInventory) Observations() <-chan Observation
Observations is complete when InspectRecovery returns. Draining or ignoring this bounded history has no effect on subsequent identity-bound discard.
func (*RecoveryInventory) Snapshot ¶
func (inventory *RecoveryInventory) Snapshot() (RecoverySnapshot, error)
type RecoveryObservation ¶
type RecoveryObservation = recovery.Observation
type RecoveryOperation ¶
type RecoveryOperationState ¶
type RecoveryOperationState = recovery.OperationState
type RecoveryPhase ¶
type RecoverySnapshot ¶
func NewRecoverySnapshot ¶
func NewRecoverySnapshot(operations []RecoveryOperation, registryUnknown bool) (RecoverySnapshot, error)
type RelaySetupProgress ¶
type RelaySetupProgress = relaysetup.Progress
type RelaySetupRequest ¶
type RelaySetupRequest = relaysetup.Request
type RelaySetupResult ¶
type RelaySetupResult = relaysetup.Result
type ShareAuthorization ¶
type ShareAuthorization struct {
}
type ShareDependencies ¶
type ShareDependencies struct {
}
Dependencies expose construction seams; task control and aggregate budgets are assigned by the Engine so an injected constructor cannot replace another task's ownership.
type SharePeers ¶
type ShareReady ¶
type ShareReady struct {
}
type ShareRelayCandidate ¶
type ShareRelayCandidate = relayprofile.Registration
type ShareRelays ¶
type ShareRequest ¶
type ShareRequest struct {
}
type ShareResult ¶
type ShareSessionFactory ¶
type ShareSessionFactory = share.SessionFactory
type ShareSnapshot ¶
type ShareSnapshot struct {
Result *TaskResult[ShareResult]
}
ShareSnapshot separates retained startup from lifecycle and current relay admission. Existing P2P transfers do not depend on relay availability.
type ShareTask ¶
type ShareTask struct {
*Task[ShareResult]
// contains filtered or unexported fields
}
func (*ShareTask) CancelBeforeReady ¶ added in v0.1.4
CancelBeforeReady reserves cancellation of an unpublished attempt. Once a link is ready, only the ordinary share stop operation can withdraw it.
func (*ShareTask) Ready ¶
func (current *ShareTask) Ready(ctx context.Context) (ShareReady, error)
Ready waits for the first relay registration and local session admission to start. No receiver, P2P connection, or directory scan is required. The retained result is a startup milestone, not a live availability check; canceling this wait does not stop the share. Call StopShare and Wait to stop and join its work.
func (*ShareTask) Snapshot ¶
func (current *ShareTask) Snapshot() ShareSnapshot
type StopReason ¶
type StopReason = task.StopReason
type Task ¶
type Task[T any] struct { // contains filtered or unexported fields }
func (*Task[T]) Observations ¶
func (current *Task[T]) Observations() <-chan Observation
type TaskCompletion ¶
type TaskCompletion[T any] = task.Completion[T]
func SettleReceive ¶
func SettleReceive(input ReceiveSettlementInput) (TaskCompletion[ReceiveResult], error)
type TaskResult ¶
type TaskSettlement ¶
type TaskSettlement = task.Settlement
type UnreleasedResourcesError ¶
type UnreleasedResourcesError struct {
CatalogUsage catalog.ResourceUsage
CacheBytes uint64
// contains filtered or unexported fields
}
UnreleasedResourcesError identifies authority still charged after all tasks have settled. It prevents an ownership defect from becoming a clean shutdown.
func (*UnreleasedResourcesError) Error ¶
func (failure *UnreleasedResourcesError) Error() string
func (*UnreleasedResourcesError) Unwrap ¶
func (failure *UnreleasedResourcesError) Unwrap() error
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package account coordinates official-service credentials outside relay handshakes.
|
Package account coordinates official-service credentials outside relay handshakes. |
|
Package builtinnetwork is application wiring, never an engine default.
|
Package builtinnetwork is application wiring, never an engine default. |
|
internal
|
|
|
configjson
Package configjson decodes configuration objects whose member names are case-insensitive, including provider-owned JSON nested in a document.
|
Package configjson decodes configuration objects whose member names are case-insensitive, including provider-owned JSON nested in a document. |
|
nativeconnectivity
Package nativeconnectivity assembles the native peer transport used by application workflows.
|
Package nativeconnectivity assembles the native peer transport used by application workflows. |
|
networkruntime
Package networkruntime assembles directory trust, recent connection facts and frontend health without giving library callers implicit infrastructure.
|
Package networkruntime assembles directory trust, recent connection facts and frontend health without giving library callers implicit infrastructure. |
|
receive
Package receive owns one receive operation across connection generations.
|
Package receive owns one receive operation across connection generations. |
|
share
Package share owns native sender application orchestration.
|
Package share owns native sender application orchestration. |
|
statefile
Package statefile owns private atomic files and recoverable local commits.
|
Package statefile owns private atomic files and recoverable local commits. |
|
task
Package task owns one native operation's cancellation and durable completion.
|
Package task owns one native operation's cancellation and durable completion. |
|
turnruntime
Package turnruntime owns TURN settings, shared account budgets and demand-driven discovery.
|
Package turnruntime owns TURN settings, shared account budgets and demand-driven discovery. |
|
turnruntime/internal/provider
Package provider implements credential issuers.
|
Package provider implements credential issuers. |
|
Package networkconfig describes application-injected network and frontend trust.
|
Package networkconfig describes application-injected network and frontend trust. |
|
Package networkdirectory owns signed network snapshots, bounded refresh and durable rollback protection.
|
Package networkdirectory owns signed network snapshots, bounded refresh and durable rollback protection. |
|
Package output owns destination acquisition and receive output contracts.
|
Package output owns destination acquisition and receive output contracts. |
|
Package relayconfig owns saved profiles, active relay selection and frontend choice.
|
Package relayconfig owns saved profiles, active relay selection and frontend choice. |
|
Package relayprofile describes application relay selection and saved service credentials.
|
Package relayprofile describes application relay selection and saved service credentials. |
|
Package relaysetup implements discover, approve and install for native applications.
|
Package relaysetup implements discover, approve and install for native applications. |
|
Package turn exposes application settings, status and observations.
|
Package turn exposes application settings, status and observations. |
|
Package turncache stores replaceable observations, scoped to relay authority.
|
Package turncache stores replaceable observations, scoped to relay authority. |