Documentation
¶
Index ¶
- Constants
- func SetWebListenerKeepaliveFunc(fn WebListenerKeepaliveFunc) func()
- type CoreRootServer
- func (s *CoreRootServer) AccessStateAtom(ctx context.Context, req *s4wave_root.AccessStateAtomRequest) (*s4wave_root.AccessStateAtomResponse, error)
- func (s *CoreRootServer) AccessWebListener(ctx context.Context, req *s4wave_root.AccessWebListenerRequest) (*s4wave_root.AccessWebListenerResponse, error)
- func (s *CoreRootServer) Close()
- func (s *CoreRootServer) DeleteSession(ctx context.Context, req *s4wave_root.DeleteSessionRequest) (*s4wave_root.DeleteSessionResponse, error)
- func (s *CoreRootServer) GetCdn(ctx context.Context, req *s4wave_root.GetCdnRequest) (*s4wave_root.GetCdnResponse, error)
- func (s *CoreRootServer) GetChangelog(ctx context.Context, req *s4wave_root.GetChangelogRequest) (*s4wave_root.GetChangelogResponse, error)
- func (s *CoreRootServer) GetDebugDb(ctx context.Context, _ *s4wave_root.GetDebugDbRequest) (*s4wave_root.GetDebugDbResponse, error)
- func (s *CoreRootServer) GetSessionMetadata(ctx context.Context, req *s4wave_root.GetSessionMetadataRequest) (*s4wave_root.GetSessionMetadataResponse, error)
- func (s *CoreRootServer) HashSum(ctx context.Context, req *s4wave_root.HashSumRequest) (*s4wave_root.HashSumResponse, error)
- func (s *CoreRootServer) HashValidate(ctx context.Context, req *s4wave_root.HashValidateRequest) (*s4wave_root.HashValidateResponse, error)
- func (s *CoreRootServer) ListProviders(ctx context.Context, req *s4wave_root.ListProvidersRequest) (*s4wave_root.ListProvidersResponse, error)
- func (s *CoreRootServer) ListSessions(ctx context.Context, req *s4wave_root.ListSessionsRequest) (*s4wave_root.ListSessionsResponse, error)
- func (s *CoreRootServer) ListSpaceRootAliases(ctx context.Context, _ *s4wave_root.ListSpaceRootAliasesRequest) (*s4wave_root.ListSpaceRootAliasesResponse, error)
- func (s *CoreRootServer) LookupProvider(ctx context.Context, req *s4wave_root.LookupProviderRequest) (*s4wave_root.LookupProviderResponse, error)
- func (s *CoreRootServer) MarshalHash(ctx context.Context, req *s4wave_root.MarshalHashRequest) (*s4wave_root.MarshalHashResponse, error)
- func (s *CoreRootServer) MountSession(ctx context.Context, req *s4wave_root.MountSessionRequest) (*s4wave_root.MountSessionResponse, error)
- func (s *CoreRootServer) MountSessionByIdx(ctx context.Context, req *s4wave_root.MountSessionByIdxRequest) (*s4wave_root.MountSessionByIdxResponse, error)
- func (s *CoreRootServer) ParseHash(ctx context.Context, req *s4wave_root.ParseHashRequest) (*s4wave_root.ParseHashResponse, error)
- func (s *CoreRootServer) ReclaimRuntime(_ context.Context, _ *s4wave_root.ReclaimRuntimeRequest) (*s4wave_root.ReclaimRuntimeResponse, error)
- func (s *CoreRootServer) Register(mux srpc.Mux) error
- func (s *CoreRootServer) RemoveSpaceRootAlias(ctx context.Context, req *s4wave_root.RemoveSpaceRootAliasRequest) (*s4wave_root.RemoveSpaceRootAliasResponse, error)
- func (s *CoreRootServer) ResetSession(ctx context.Context, req *s4wave_root.ResetSessionByIdxRequest) (*s4wave_root.ResetSessionByIdxResponse, error)
- func (s *CoreRootServer) RespondToListenerYieldPrompt(_ context.Context, req *s4wave_root.RespondToListenerYieldPromptRequest) (*s4wave_root.RespondToListenerYieldPromptResponse, error)
- func (s *CoreRootServer) SetHostPluginID(pluginID string)
- func (s *CoreRootServer) StopWebListener(ctx context.Context, req *s4wave_root.StopWebListenerRequest) (*s4wave_root.StopWebListenerResponse, error)
- func (s *CoreRootServer) UnlockSession(ctx context.Context, req *s4wave_root.UnlockSessionByIdxRequest) (*s4wave_root.UnlockSessionByIdxResponse, error)
- func (s *CoreRootServer) UpsertSpaceRootAlias(ctx context.Context, req *s4wave_root.UpsertSpaceRootAliasRequest) (*s4wave_root.UpsertSpaceRootAliasResponse, error)
- func (s *CoreRootServer) WatchAllAccountStatuses(req *s4wave_root.WatchAllAccountStatusesRequest, ...) error
- func (s *CoreRootServer) WatchListenerStatus(_ *s4wave_root.WatchListenerStatusRequest, ...) error
- func (s *CoreRootServer) WatchListenerYieldPrompts(_ *s4wave_root.WatchListenerYieldPromptsRequest, ...) error
- func (s *CoreRootServer) WatchRuntimeHandoff(_ *s4wave_root.WatchRuntimeHandoffRequest, ...) error
- func (s *CoreRootServer) WatchSessionMetadata(req *s4wave_root.WatchSessionMetadataRequest, ...) error
- func (s *CoreRootServer) WatchSessions(req *s4wave_root.WatchSessionsRequest, ...) error
- func (s *CoreRootServer) WatchSpaceRootAliases(_ *s4wave_root.WatchSpaceRootAliasesRequest, ...) error
- func (s *CoreRootServer) WatchSpaceRootRuntime(req *s4wave_root.WatchSpaceRootRuntimeRequest, ...) error
- func (s *CoreRootServer) WatchStateAtoms(_ *s4wave_root.WatchStateAtomsRequest, ...) error
- func (s *CoreRootServer) WatchWebListeners(_ *s4wave_root.WatchWebListenersRequest, ...) error
- type WebListenerKeepaliveFunc
Constants ¶
const StateAtomObjectStoreID = "state-atoms"
StateAtomObjectStoreID is the object store ID for state atoms.
Variables ¶
This section is empty.
Functions ¶
func SetWebListenerKeepaliveFunc ¶
func SetWebListenerKeepaliveFunc(fn WebListenerKeepaliveFunc) func()
SetWebListenerKeepaliveFunc installs the process-local web listener keepalive hook.
Types ¶
type CoreRootServer ¶
type CoreRootServer struct {
// contains filtered or unexported fields
}
CoreRootServer implements the RootResourceService for s4wave core.
func NewCoreRootServer ¶
func NewCoreRootServer(le *logrus.Entry, b bus.Bus) *CoreRootServer
NewCoreRootServer creates a new CoreRootServer.
func (*CoreRootServer) AccessStateAtom ¶
func (s *CoreRootServer) AccessStateAtom( ctx context.Context, req *s4wave_root.AccessStateAtomRequest, ) (*s4wave_root.AccessStateAtomResponse, error)
AccessStateAtom accesses a state atom resource.
func (*CoreRootServer) AccessWebListener ¶
func (s *CoreRootServer) AccessWebListener( ctx context.Context, req *s4wave_root.AccessWebListenerRequest, ) (*s4wave_root.AccessWebListenerResponse, error)
AccessWebListener creates or reuses a localhost web listener.
func (*CoreRootServer) Close ¶
func (s *CoreRootServer) Close()
Close releases process-owned root resources.
func (*CoreRootServer) DeleteSession ¶
func (s *CoreRootServer) DeleteSession( ctx context.Context, req *s4wave_root.DeleteSessionRequest, ) (*s4wave_root.DeleteSessionResponse, error)
DeleteSession removes a session from the local session list by index.
func (*CoreRootServer) GetCdn ¶
func (s *CoreRootServer) GetCdn( ctx context.Context, req *s4wave_root.GetCdnRequest, ) (*s4wave_root.GetCdnResponse, error)
GetCdn mounts a CdnResource for the selected CDN instance and returns both the client resource id and the CDN Space ULID in one round-trip. Empty cdn_id selects the default CDN. Unknown ids return the wrapped ErrUnknownCdn from the registry so callers can distinguish misconfigured ids from transport errors.
func (*CoreRootServer) GetChangelog ¶
func (s *CoreRootServer) GetChangelog( ctx context.Context, req *s4wave_root.GetChangelogRequest, ) (*s4wave_root.GetChangelogResponse, error)
GetChangelog returns the embedded application changelog.
func (*CoreRootServer) GetDebugDb ¶
func (s *CoreRootServer) GetDebugDb( ctx context.Context, _ *s4wave_root.GetDebugDbRequest, ) (*s4wave_root.GetDebugDbResponse, error)
GetDebugDb returns a debug database resource for storage diagnostics.
func (*CoreRootServer) GetSessionMetadata ¶
func (s *CoreRootServer) GetSessionMetadata( ctx context.Context, req *s4wave_root.GetSessionMetadataRequest, ) (*s4wave_root.GetSessionMetadataResponse, error)
GetSessionMetadata returns metadata for a session by index.
func (*CoreRootServer) HashSum ¶
func (s *CoreRootServer) HashSum( ctx context.Context, req *s4wave_root.HashSumRequest, ) (*s4wave_root.HashSumResponse, error)
HashSum computes a hash of the given data with the specified hash type.
func (*CoreRootServer) HashValidate ¶
func (s *CoreRootServer) HashValidate( ctx context.Context, req *s4wave_root.HashValidateRequest, ) (*s4wave_root.HashValidateResponse, error)
HashValidate validates a hash object.
func (*CoreRootServer) ListProviders ¶
func (s *CoreRootServer) ListProviders( ctx context.Context, req *s4wave_root.ListProvidersRequest, ) (*s4wave_root.ListProvidersResponse, error)
ListProviders lists the available providers.
func (*CoreRootServer) ListSessions ¶
func (s *CoreRootServer) ListSessions( ctx context.Context, req *s4wave_root.ListSessionsRequest, ) (*s4wave_root.ListSessionsResponse, error)
ListSessions lists the configured sessions.
func (*CoreRootServer) ListSpaceRootAliases ¶ added in v0.51.2
func (s *CoreRootServer) ListSpaceRootAliases( ctx context.Context, _ *s4wave_root.ListSpaceRootAliasesRequest, ) (*s4wave_root.ListSpaceRootAliasesResponse, error)
WatchSpaceRootAliases streams configured local state-root records.
func (*CoreRootServer) LookupProvider ¶
func (s *CoreRootServer) LookupProvider(ctx context.Context, req *s4wave_root.LookupProviderRequest) (*s4wave_root.LookupProviderResponse, error)
LookupProvider accesses a provider Resource by ID.
func (*CoreRootServer) MarshalHash ¶
func (s *CoreRootServer) MarshalHash( ctx context.Context, req *s4wave_root.MarshalHashRequest, ) (*s4wave_root.MarshalHashResponse, error)
MarshalHash marshals a Hash to a base58 string.
func (*CoreRootServer) MountSession ¶
func (s *CoreRootServer) MountSession( ctx context.Context, req *s4wave_root.MountSessionRequest, ) (*s4wave_root.MountSessionResponse, error)
MountSession mounts a session and returns the Session resource by SessionRef.
func (*CoreRootServer) MountSessionByIdx ¶
func (s *CoreRootServer) MountSessionByIdx( ctx context.Context, req *s4wave_root.MountSessionByIdxRequest, ) (*s4wave_root.MountSessionByIdxResponse, error)
MountSessionByIdx mounts a session by index and returns the Session resource.
func (*CoreRootServer) ParseHash ¶
func (s *CoreRootServer) ParseHash( ctx context.Context, req *s4wave_root.ParseHashRequest, ) (*s4wave_root.ParseHashResponse, error)
ParseHash parses a Hash from a base58 string.
func (*CoreRootServer) ReclaimRuntime ¶
func (s *CoreRootServer) ReclaimRuntime( _ context.Context, _ *s4wave_root.ReclaimRuntimeRequest, ) (*s4wave_root.ReclaimRuntimeResponse, error)
ReclaimRuntime signals the listener controller to reclaim the runtime from the remote owner.
func (*CoreRootServer) Register ¶
func (s *CoreRootServer) Register(mux srpc.Mux) error
Register registers the server with the mux.
func (*CoreRootServer) RemoveSpaceRootAlias ¶ added in v0.51.2
func (s *CoreRootServer) RemoveSpaceRootAlias( ctx context.Context, req *s4wave_root.RemoveSpaceRootAliasRequest, ) (*s4wave_root.RemoveSpaceRootAliasResponse, error)
RemoveSpaceRootAlias removes a configured local state root.
func (*CoreRootServer) ResetSession ¶
func (s *CoreRootServer) ResetSession( ctx context.Context, req *s4wave_root.ResetSessionByIdxRequest, ) (*s4wave_root.ResetSessionByIdxResponse, error)
ResetSession resets a PIN-locked session via entity key verification.
func (*CoreRootServer) RespondToListenerYieldPrompt ¶
func (s *CoreRootServer) RespondToListenerYieldPrompt( _ context.Context, req *s4wave_root.RespondToListenerYieldPromptRequest, ) (*s4wave_root.RespondToListenerYieldPromptResponse, error)
RespondToListenerYieldPrompt resolves a pending prompt with the user's decision.
func (*CoreRootServer) SetHostPluginID ¶ added in v0.51.3
func (s *CoreRootServer) SetHostPluginID(pluginID string)
SetHostPluginID records the plugin id that owns this resource root.
func (*CoreRootServer) StopWebListener ¶
func (s *CoreRootServer) StopWebListener( ctx context.Context, req *s4wave_root.StopWebListenerRequest, ) (*s4wave_root.StopWebListenerResponse, error)
StopWebListener stops a daemon-owned localhost web listener.
func (*CoreRootServer) UnlockSession ¶
func (s *CoreRootServer) UnlockSession( ctx context.Context, req *s4wave_root.UnlockSessionByIdxRequest, ) (*s4wave_root.UnlockSessionByIdxResponse, error)
UnlockSession unlocks a PIN-locked session before mounting.
func (*CoreRootServer) UpsertSpaceRootAlias ¶ added in v0.51.2
func (s *CoreRootServer) UpsertSpaceRootAlias( ctx context.Context, req *s4wave_root.UpsertSpaceRootAliasRequest, ) (*s4wave_root.UpsertSpaceRootAliasResponse, error)
UpsertSpaceRootAlias validates and persists a configured local state root.
func (*CoreRootServer) WatchAllAccountStatuses ¶
func (s *CoreRootServer) WatchAllAccountStatuses( req *s4wave_root.WatchAllAccountStatusesRequest, strm s4wave_root.SRPCRootResourceService_WatchAllAccountStatusesStream, ) error
WatchAllAccountStatuses streams provider account statuses for all sessions.
func (*CoreRootServer) WatchListenerStatus ¶
func (s *CoreRootServer) WatchListenerStatus( _ *s4wave_root.WatchListenerStatusRequest, strm s4wave_root.SRPCRootResourceService_WatchListenerStatusStream, ) error
WatchListenerStatus streams the current desktop resource listener status: effective socket path, whether the listener is currently bound, and the count of connected resource clients. The UI uses this to render a live status chip on the session-local command-line setup page.
func (*CoreRootServer) WatchListenerYieldPrompts ¶
func (s *CoreRootServer) WatchListenerYieldPrompts( _ *s4wave_root.WatchListenerYieldPromptsRequest, strm s4wave_root.SRPCRootResourceService_WatchListenerYieldPromptsStream, ) error
WatchListenerYieldPrompts streams the set of pending takeover prompts surfaced by the desktop resource listener's yield broker. The UI subscribes to this stream, renders a modal for the first prompt, and resolves via RespondToListenerYieldPrompt.
func (*CoreRootServer) WatchRuntimeHandoff ¶
func (s *CoreRootServer) WatchRuntimeHandoff( _ *s4wave_root.WatchRuntimeHandoffRequest, strm s4wave_root.SRPCRootResourceService_WatchRuntimeHandoffStream, ) error
WatchRuntimeHandoff streams the current runtime handoff state so the UI can render the "Runtime handed off" banner and the Reclaim action.
func (*CoreRootServer) WatchSessionMetadata ¶
func (s *CoreRootServer) WatchSessionMetadata( req *s4wave_root.WatchSessionMetadataRequest, strm s4wave_root.SRPCRootResourceService_WatchSessionMetadataStream, ) error
WatchSessionMetadata streams metadata for a session by index.
func (*CoreRootServer) WatchSessions ¶
func (s *CoreRootServer) WatchSessions( req *s4wave_root.WatchSessionsRequest, strm s4wave_root.SRPCRootResourceService_WatchSessionsStream, ) error
WatchSessions streams the session list, sending updates when sessions change.
func (*CoreRootServer) WatchSpaceRootAliases ¶ added in v0.51.2
func (s *CoreRootServer) WatchSpaceRootAliases( _ *s4wave_root.WatchSpaceRootAliasesRequest, strm s4wave_root.SRPCRootResourceService_WatchSpaceRootAliasesStream, ) error
WatchSpaceRootAliases streams configured local state-root records.
func (*CoreRootServer) WatchSpaceRootRuntime ¶ added in v0.51.2
func (s *CoreRootServer) WatchSpaceRootRuntime( req *s4wave_root.WatchSpaceRootRuntimeRequest, strm s4wave_root.SRPCRootResourceService_WatchSpaceRootRuntimeStream, ) error
WatchSpaceRootRuntime streams sessions from a selected configured root daemon.
func (*CoreRootServer) WatchStateAtoms ¶
func (s *CoreRootServer) WatchStateAtoms( _ *s4wave_root.WatchStateAtomsRequest, strm s4wave_root.SRPCRootResourceService_WatchStateAtomsStream, ) error
WatchStateAtoms streams the known root state atom store ids on change.
func (*CoreRootServer) WatchWebListeners ¶
func (s *CoreRootServer) WatchWebListeners( _ *s4wave_root.WatchWebListenersRequest, strm s4wave_root.SRPCRootResourceService_WatchWebListenersStream, ) error
WatchWebListeners streams daemon-owned localhost web listeners.
type WebListenerKeepaliveFunc ¶
type WebListenerKeepaliveFunc func(listenerID string) func()
WebListenerKeepaliveFunc acquires daemon lifetime for a background listener.