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

resource_space

package
v0.57.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountedBodySessionPeerID

func MountedBodySessionPeerID(body space.SpaceSharedObjectBody, sessionPeerID string) string

MountedBodySessionPeerID returns the session peer ID a SpaceResource over body acts as. A body whose SharedObject has no local peer is read-only, so it acts as no session peer.

Types

type AttachedRpcServiceController

type AttachedRpcServiceController struct {
	// RpcServiceController provides the RPC route after it receives a context.
	*bifrost_rpc.RpcServiceController
	// contains filtered or unexported fields
}

AttachedRpcServiceController routes the RPC services under a prefix to an attached client and signals when the route can resolve calls.

func NewAttachedRpcServiceController

func NewAttachedRpcServiceController(prefix string, client srpc.Invoker) *AttachedRpcServiceController

NewAttachedRpcServiceController constructs a route of the services under prefix to client. The prefix is stripped before the call reaches client.

func (*AttachedRpcServiceController) Execute

Execute initializes the RPC service controller and then signals readiness.

func (*AttachedRpcServiceController) Ready

func (c *AttachedRpcServiceController) Ready() <-chan struct{}

Ready returns a channel closed once the route can resolve calls.

type SpaceContentsResource

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

SpaceContentsResource provides streaming plugin status for one contents mount of a Space. Every mount of the Space shares one plugin runtime, and each mount keeps every plugin the Space lists running.

func NewSpaceContentsResource

func NewSpaceContentsResource(
	le *logrus.Entry,
	b bus.Bus,
	engine world.Engine,
	spaceID string,
	engineID string,
	runtime *plugin_space_runtime.Controller,
	runtimeRef directive.Reference,
) *SpaceContentsResource

NewSpaceContentsResource creates a contents mount of the Space runtime that demands every plugin the Space lists. The mount owns runtimeRef and releases it in Release.

func (*SpaceContentsResource) BindAttachedRpcService added in v0.57.2

BindAttachedRpcService publishes a caller-attached Resource under one private service ID prefix for the caller attachment lifetime. The route follows the running generation of the shared Space runtime, and the prefix is reserved across every mount of the Space.

func (*SpaceContentsResource) GetMux

func (r *SpaceContentsResource) GetMux() srpc.Invoker

GetMux returns the rpc mux.

func (*SpaceContentsResource) Release

func (r *SpaceContentsResource) Release()

Release ends the calls of the mount and drops its demand and runtime reference. The runtime stops after its last holder is released.

func (*SpaceContentsResource) SetProcessBinding

SetProcessBinding sets the state for a process binding.

func (*SpaceContentsResource) WatchState

WatchState streams the current plugin and process state for the space.

type SpaceResource

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

SpaceResource wraps a Space for resource access.

func NewSpaceResource

func NewSpaceResource(le *logrus.Entry, b bus.Bus, sp space.SpaceSharedObjectBody) *SpaceResource

NewSpaceResource creates a new SpaceResource.

func NewSpaceResourceWithSessionPeerID added in v0.51.2

func NewSpaceResourceWithSessionPeerID(
	le *logrus.Entry,
	b bus.Bus,
	sp space.SpaceSharedObjectBody,
	sessionPeerID string,
) *SpaceResource

NewSpaceResourceWithSessionPeerID creates a new SpaceResource with the mounted local session peer ID.

func NewSpaceResourceWithSessionPeerIDAndHostPluginID added in v0.51.3

func NewSpaceResourceWithSessionPeerIDAndHostPluginID(
	le *logrus.Entry,
	b bus.Bus,
	sp space.SpaceSharedObjectBody,
	sessionPeerID string,
	hostPluginID string,
) *SpaceResource

NewSpaceResourceWithSessionPeerIDAndHostPluginID creates a SpaceResource with the mounted local session peer ID and host plugin ID.

func (*SpaceResource) AccessWorld

AccessWorld accesses the World associated with the space.

func (*SpaceResource) AcquireContentsRuntime

AcquireContentsRuntime acquires the shared plugin runtime of the Space.

Every holder acquiring it through a SpaceResource with the same settings shares one runtime, which stops after the last reference is released. It returns before the runtime's startup completes, because startup may need document-owned plugin-host locks while applying forwarded block-store config.

func (*SpaceResource) AddSpacePlugin

AddSpacePlugin adds a plugin manifest ID to the SpaceSettings plugin list.

func (*SpaceResource) BuildSpacePlugin

BuildSpacePlugin queues a plugin build as a Forge Job in the Space World. The mounted session supplies the sender; the selected Device supplies the Worker, peer, and native platform. Forge owns the Job after the commit, and a successful build installs its artifact in the Space.

func (*SpaceResource) CreateSecret added in v0.51.6

CreateSecret creates a Secret object and grants an optional reader key.

func (*SpaceResource) DeployManifests added in v0.57.2

DeployManifests handles the bidirectional manifest-set deployment stream.

func (*SpaceResource) GetMux

func (r *SpaceResource) GetMux() srpc.Invoker

GetMux returns the rpc mux.

func (*SpaceResource) GetWorldEngine added in v0.51.2

func (r *SpaceResource) GetWorldEngine() world.Engine

GetWorldEngine returns the Space world engine.

func (*SpaceResource) GetWorldEngineBucketID added in v0.51.2

func (r *SpaceResource) GetWorldEngineBucketID() string

GetWorldEngineBucketID returns the Space world engine bucket id.

func (*SpaceResource) GetWorldEngineID added in v0.51.2

func (r *SpaceResource) GetWorldEngineID() string

GetWorldEngineID returns the Space world engine id.

func (*SpaceResource) LookupAvailablePlugin

func (r *SpaceResource) LookupAvailablePlugin(ctx context.Context, pluginID string) (*s4wave_space.AvailablePlugin, error)

LookupAvailablePlugin returns the highest revision catalog entry for pluginID in the Space World, or nil if the World offers no such plugin.

func (*SpaceResource) MountSpaceContents

MountSpaceContents mounts the shared plugin runtime of the space and returns a sub-resource for monitoring plugin status. Mounts of the same Space share one runtime, which stops after the last mount is released.

func (*SpaceResource) NewWorldEngineResource

func (r *SpaceResource) NewWorldEngineResource() (*resource_world.EngineResource, error)

NewWorldEngineResource carries this mounted Space's session authority into an Engine capability. The receiving Resource connection owns the capability.

func (*SpaceResource) OpenPluginFrontend

OpenPluginFrontend grants one Resource a live compiler on the selected device. The source stays in this World; the Resource owns the temporary execution grant.

func (*SpaceResource) ReadSecretPayload added in v0.51.7

ReadSecretPayload reads a Secret payload under the mounted session authority.

func (*SpaceResource) RemoveSpacePlugin

RemoveSpacePlugin removes a plugin manifest ID from the SpaceSettings plugin list.

func (*SpaceResource) SetAppPluginIDs

func (r *SpaceResource) SetAppPluginIDs(ids []string)

SetAppPluginIDs supplies application composition before the resource is published.

func (*SpaceResource) SetBindingRegistry

func (r *SpaceResource) SetBindingRegistry(registry *process_binding.BindingRegistry)

SetBindingRegistry supplies the Resource root's binding event source.

func (*SpaceResource) WatchProcessBindings

WatchProcessBindings streams decisions independently of the Space runtime.

func (*SpaceResource) WatchSpaceSharingState

WatchSpaceSharingState watches the sharing snapshot for the space.

All change sources (SO state, mailbox metadata) are folded into one local broadcast so the watch loop reads every input snapshot under the same HoldLock that obtains the wait channel. This eliminates the missed-wakeup race that the previous dual-channel select had to defend against with per-source buffered signals, and coalesces near-simultaneous source changes into a single emission instead of one emission per source.

func (*SpaceResource) WatchSpaceState

WatchSpaceState watches the SpaceState for the component.

func (*SpaceResource) WriteSecretPayload

WriteSecretPayload replaces a Secret payload under the mounted session writer grant.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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