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

resource_root

package
v0.57.25 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const StateAtomObjectStoreID = "state-atoms"

StateAtomObjectStoreID is the object store ID for state atoms.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppRuntime

type AppRuntime interface {
	srpc.Invoker
	GetHTTPPathPrefix() string
}

AppRuntime exposes the Resource service and HTTP route of a live installation.

type AppStorage

type AppStorage struct {
	StorageID   string
	Engine      world.Engine
	Prefix      string
	EphemeralID string
}

AppStorage is a validated storage capability for a nested installation. EphemeralID distinguishes privately owned Worlds; supplied engines remain caller-owned.

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

AccessStateAtom accesses a state atom resource.

func (*CoreRootServer) AccessWebListener

AccessWebListener creates or reuses a localhost web listener.

func (*CoreRootServer) Close

func (s *CoreRootServer) Close()

Close releases process-owned root resources.

func (*CoreRootServer) DeleteSession

DeleteSession removes a session from the local session list by index.

func (*CoreRootServer) GetCdn

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

GetChangelog returns the embedded application changelog.

func (*CoreRootServer) GetDebugDb

GetDebugDb returns a debug database resource for storage diagnostics.

func (*CoreRootServer) GetSessionMetadata

GetSessionMetadata returns metadata for a session by index.

func (*CoreRootServer) HashSum

HashSum computes a hash of the given data with the specified hash type.

func (*CoreRootServer) HashValidate

HashValidate validates a hash object.

func (*CoreRootServer) ListProviders

ListProviders lists the available providers.

func (*CoreRootServer) ListSessions

ListSessions lists the configured sessions.

func (*CoreRootServer) ListSpaceRootAliases added in v0.51.2

ListSpaceRootAliases lists configured local state-root records.

func (*CoreRootServer) LookupProvider

LookupProvider accesses a provider Resource by ID.

func (*CoreRootServer) MarshalHash

MarshalHash marshals a Hash to a base58 string.

func (*CoreRootServer) MountApp

MountApp mounts an isolated installation using exactly one supplied storage source.

func (*CoreRootServer) MountSession

MountSession mounts a session and returns the Session resource by SessionRef.

func (*CoreRootServer) MountSessionByIdx

MountSessionByIdx mounts a session by index and returns the Session resource.

func (*CoreRootServer) ParseHash

ParseHash parses a Hash from a base58 string.

func (*CoreRootServer) ReclaimRuntime

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

RemoveSpaceRootAlias removes a configured local state root.

func (*CoreRootServer) ResetSession

ResetSession resets a PIN-locked session via entity key verification.

func (*CoreRootServer) RespondToListenerYieldPrompt

RespondToListenerYieldPrompt resolves a pending prompt with the user's decision.

func (*CoreRootServer) RunBackgroundPlugins

func (s *CoreRootServer) RunBackgroundPlugins(ctx context.Context) error

RunBackgroundPlugins keeps each Space with a confirmed background plugin that is not suspended mounted, with its plugin runtime running those plugins, for as long as the confirmation stands in its Session's metadata. The Space's other plugins run only while an application mounts its contents. Holding the Session mount keeps the Session running. Returns when ctx ends.

func (*CoreRootServer) SetAppPluginIDs

func (s *CoreRootServer) SetAppPluginIDs(ids []string)

SetAppPluginIDs supplies application composition before the resource is published.

func (*CoreRootServer) SetBindingRegistry

func (s *CoreRootServer) SetBindingRegistry(registry *process_binding.BindingRegistry)

SetBindingRegistry shares binding notifications with the parent Resource root when this root belongs to a nested application.

func (*CoreRootServer) SetHostPluginID added in v0.51.3

func (s *CoreRootServer) SetHostPluginID(pluginID string)

SetHostPluginID records the plugin id serving this resource root.

func (*CoreRootServer) SetListenerStatusBroker added in v0.57.2

func (s *CoreRootServer) SetListenerStatusBroker(broker *resource_listener.StatusBroker)

SetListenerStatusBroker injects the shared listener status broker.

func (*CoreRootServer) SetMountAppFunc

func (s *CoreRootServer) SetMountAppFunc(fn MountAppFunc)

SetMountAppFunc installs the app runtime composition before serving requests.

func (*CoreRootServer) SetYieldBroker added in v0.57.2

func (s *CoreRootServer) SetYieldBroker(broker *yield_policy.Broker)

SetYieldBroker injects the shared listener yield broker. The composition root that also wires the resource listener controller injects one broker so takeover prompts and reclaim signals agree across consumers.

func (*CoreRootServer) StopWebListener

StopWebListener stops a daemon-owned localhost web listener.

func (*CoreRootServer) UnlockSession

UnlockSession unlocks a PIN-locked session before mounting.

func (*CoreRootServer) UpsertSpaceRootAlias added in v0.51.2

UpsertSpaceRootAlias validates and persists a configured local state root.

func (*CoreRootServer) WatchAllAccountStatuses

WatchAllAccountStatuses streams provider account statuses for all sessions.

func (*CoreRootServer) WatchListenerStatus

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 and to choose the agent prompt. A runtime without a resource listener, such as the browser, sends one empty status.

func (*CoreRootServer) WatchListenerYieldPrompts

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

WatchRuntimeHandoff streams the current runtime handoff state so the UI can render the "Runtime handed off" banner and the Reclaim action.

func (*CoreRootServer) WatchSessionMetadata

WatchSessionMetadata streams metadata for a session by index.

func (*CoreRootServer) WatchSessions

WatchSessions streams the session list, sending updates when sessions change.

func (*CoreRootServer) WatchSpaceRootAliases added in v0.51.2

WatchSpaceRootAliases streams configured local state-root records.

func (*CoreRootServer) WatchSpaceRootRuntime added in v0.51.2

WatchSpaceRootRuntime streams sessions from a selected configured root daemon.

func (*CoreRootServer) WatchStateAtoms

WatchStateAtoms streams the known root state atom store ids on change.

func (*CoreRootServer) WatchWebListeners

WatchWebListeners streams daemon-owned localhost web listeners.

type MountAppFunc

type MountAppFunc func(context.Context, AppStorage) (AppRuntime, func(), error)

MountAppFunc attaches to the ordinary runtime composed by the root controller.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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