Documentation
¶
Index ¶
- func MountedBodySessionPeerID(body space.SpaceSharedObjectBody, sessionPeerID string) string
- type AttachedRpcServiceController
- type SpaceContentsResource
- func (r *SpaceContentsResource) BindAttachedRpcService(req *s4wave_space.BindAttachedRpcServiceRequest, ...) error
- func (r *SpaceContentsResource) GetMux() srpc.Invoker
- func (r *SpaceContentsResource) Release()
- func (r *SpaceContentsResource) SetProcessBinding(ctx context.Context, req *s4wave_space.SetProcessBindingRequest) (*s4wave_space.SetProcessBindingResponse, error)
- func (r *SpaceContentsResource) WatchState(req *s4wave_space.WatchSpaceContentsStateRequest, ...) error
- type SpaceResource
- func NewSpaceResource(le *logrus.Entry, b bus.Bus, sp space.SpaceSharedObjectBody) *SpaceResource
- func NewSpaceResourceWithSessionPeerID(le *logrus.Entry, b bus.Bus, sp space.SpaceSharedObjectBody, ...) *SpaceResource
- func NewSpaceResourceWithSessionPeerIDAndHostPluginID(le *logrus.Entry, b bus.Bus, sp space.SpaceSharedObjectBody, ...) *SpaceResource
- func (r *SpaceResource) AccessWorld(ctx context.Context, req *s4wave_space.AccessWorldRequest) (*s4wave_space.AccessWorldResponse, error)
- func (r *SpaceResource) AcquireContentsRuntime(ctx context.Context) (*plugin_space.Config, *plugin_space_runtime.Controller, directive.Reference, ...)
- func (r *SpaceResource) AddSpacePlugin(ctx context.Context, req *s4wave_space.AddSpacePluginRequest) (*s4wave_space.AddSpacePluginResponse, error)
- func (r *SpaceResource) BuildSpacePlugin(ctx context.Context, req *s4wave_space.BuildSpacePluginRequest) (*s4wave_space.BuildSpacePluginResponse, error)
- func (r *SpaceResource) CreateSecret(ctx context.Context, req *s4wave_space.CreateSecretRequest) (*s4wave_space.CreateSecretResponse, error)
- func (r *SpaceResource) DeployManifests(strm s4wave_space.SRPCSpaceResourceService_DeployManifestsStream) error
- func (r *SpaceResource) GetMux() srpc.Invoker
- func (r *SpaceResource) GetWorldEngine() world.Engine
- func (r *SpaceResource) GetWorldEngineBucketID() string
- func (r *SpaceResource) GetWorldEngineID() string
- func (r *SpaceResource) LookupAvailablePlugin(ctx context.Context, pluginID string) (*s4wave_space.AvailablePlugin, error)
- func (r *SpaceResource) MountSpaceContents(ctx context.Context, req *s4wave_space.MountSpaceContentsRequest) (*s4wave_space.MountSpaceContentsResponse, error)
- func (r *SpaceResource) NewWorldEngineResource() (*resource_world.EngineResource, error)
- func (r *SpaceResource) OpenPluginFrontend(ctx context.Context, request *s4wave_space.BuildSpacePluginRequest) (*s4wave_space.OpenPluginFrontendResponse, error)
- func (r *SpaceResource) ReadSecretPayload(ctx context.Context, req *s4wave_space.ReadSecretPayloadRequest) (*s4wave_space.ReadSecretPayloadResponse, error)
- func (r *SpaceResource) RemoveSpacePlugin(ctx context.Context, req *s4wave_space.RemoveSpacePluginRequest) (*s4wave_space.RemoveSpacePluginResponse, error)
- func (r *SpaceResource) SetAppPluginIDs(ids []string)
- func (r *SpaceResource) SetBindingRegistry(registry *process_binding.BindingRegistry)
- func (r *SpaceResource) WatchProcessBindings(_ *s4wave_space.WatchProcessBindingsRequest, ...) error
- func (r *SpaceResource) WatchSpaceSharingState(req *s4wave_space.WatchSpaceSharingStateRequest, ...) error
- func (r *SpaceResource) WatchSpaceState(req *s4wave_space.WatchSpaceStateRequest, ...) error
- func (r *SpaceResource) WriteSecretPayload(ctx context.Context, req *s4wave_space.WriteSecretPayloadRequest) (*s4wave_space.WriteSecretPayloadResponse, error)
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 ¶
func (c *AttachedRpcServiceController) Execute(ctx context.Context) error
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
func (r *SpaceContentsResource) BindAttachedRpcService( req *s4wave_space.BindAttachedRpcServiceRequest, strm s4wave_space.SRPCSpaceContentsResourceService_BindAttachedRpcServiceStream, ) error
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 ¶
func (r *SpaceContentsResource) SetProcessBinding( ctx context.Context, req *s4wave_space.SetProcessBindingRequest, ) (*s4wave_space.SetProcessBindingResponse, error)
SetProcessBinding sets the state for a process binding.
func (*SpaceContentsResource) WatchState ¶
func (r *SpaceContentsResource) WatchState( req *s4wave_space.WatchSpaceContentsStateRequest, strm s4wave_space.SRPCSpaceContentsResourceService_WatchStateStream, ) error
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 ¶
func (r *SpaceResource) AccessWorld( ctx context.Context, req *s4wave_space.AccessWorldRequest, ) (*s4wave_space.AccessWorldResponse, error)
AccessWorld accesses the World associated with the space.
func (*SpaceResource) AcquireContentsRuntime ¶
func (r *SpaceResource) AcquireContentsRuntime(ctx context.Context) ( *plugin_space.Config, *plugin_space_runtime.Controller, directive.Reference, error, )
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 ¶
func (r *SpaceResource) AddSpacePlugin( ctx context.Context, req *s4wave_space.AddSpacePluginRequest, ) (*s4wave_space.AddSpacePluginResponse, error)
AddSpacePlugin adds a plugin manifest ID to the SpaceSettings plugin list.
func (*SpaceResource) BuildSpacePlugin ¶
func (r *SpaceResource) BuildSpacePlugin(ctx context.Context, req *s4wave_space.BuildSpacePluginRequest) (*s4wave_space.BuildSpacePluginResponse, error)
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
func (r *SpaceResource) CreateSecret( ctx context.Context, req *s4wave_space.CreateSecretRequest, ) (*s4wave_space.CreateSecretResponse, error)
CreateSecret creates a Secret object and grants an optional reader key.
func (*SpaceResource) DeployManifests ¶ added in v0.57.2
func (r *SpaceResource) DeployManifests(strm s4wave_space.SRPCSpaceResourceService_DeployManifestsStream) error
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 ¶
func (r *SpaceResource) MountSpaceContents( ctx context.Context, req *s4wave_space.MountSpaceContentsRequest, ) (*s4wave_space.MountSpaceContentsResponse, error)
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 ¶
func (r *SpaceResource) OpenPluginFrontend(ctx context.Context, request *s4wave_space.BuildSpacePluginRequest) (*s4wave_space.OpenPluginFrontendResponse, error)
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
func (r *SpaceResource) ReadSecretPayload( ctx context.Context, req *s4wave_space.ReadSecretPayloadRequest, ) (*s4wave_space.ReadSecretPayloadResponse, error)
ReadSecretPayload reads a Secret payload under the mounted session authority.
func (*SpaceResource) RemoveSpacePlugin ¶
func (r *SpaceResource) RemoveSpacePlugin( ctx context.Context, req *s4wave_space.RemoveSpacePluginRequest, ) (*s4wave_space.RemoveSpacePluginResponse, error)
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 ¶
func (r *SpaceResource) WatchProcessBindings( _ *s4wave_space.WatchProcessBindingsRequest, strm s4wave_space.SRPCSpaceResourceService_WatchProcessBindingsStream, ) error
WatchProcessBindings streams decisions independently of the Space runtime.
func (*SpaceResource) WatchSpaceSharingState ¶
func (r *SpaceResource) WatchSpaceSharingState( req *s4wave_space.WatchSpaceSharingStateRequest, strm s4wave_space.SRPCSpaceResourceService_WatchSpaceSharingStateStream, ) error
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 ¶
func (r *SpaceResource) WatchSpaceState( req *s4wave_space.WatchSpaceStateRequest, strm s4wave_space.SRPCSpaceResourceService_WatchSpaceStateStream, ) error
WatchSpaceState watches the SpaceState for the component.
func (*SpaceResource) WriteSecretPayload ¶
func (r *SpaceResource) WriteSecretPayload(ctx context.Context, req *s4wave_space.WriteSecretPayloadRequest) (*s4wave_space.WriteSecretPayloadResponse, error)
WriteSecretPayload replaces a Secret payload under the mounted session writer grant.