Documentation
¶
Index ¶
- Constants
- func Activate(ctx context.Context, scope srpc.Client) error
- func NewSRPCGenerationServiceHandler(impl SRPCGenerationServiceServer, serviceID string) srpc.Handler
- func NewSRPCRegistrationServiceHandler(impl SRPCRegistrationServiceServer, serviceID string) srpc.Handler
- func PrepareGeneration(ctx context.Context, b bus.Bus, core *resource_client.Client, root srpc.Client) (resource_client.ResourceRef, error)
- func SRPCRegisterGenerationService(mux srpc.Mux, impl SRPCGenerationServiceServer) error
- func SRPCRegisterRegistrationService(mux srpc.Mux, impl SRPCRegistrationServiceServer) error
- type ActivateRequest
- func (m *ActivateRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ActivateRequest) CloneVT() *ActivateRequest
- func (this *ActivateRequest) EqualMessageVT(thatMsg any) bool
- func (this *ActivateRequest) EqualVT(that *ActivateRequest) bool
- func (x *ActivateRequest) MarshalJSON() ([]byte, error)
- func (x *ActivateRequest) MarshalProtoJSON(s *json.MarshalState)
- func (x *ActivateRequest) MarshalProtoText() string
- func (m *ActivateRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ActivateRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *ActivateRequest) MarshalVT() (dAtA []byte, err error)
- func (*ActivateRequest) ProtoMessage()
- func (x *ActivateRequest) Reset()
- func (m *ActivateRequest) SizeVT() (n int)
- func (x *ActivateRequest) String() string
- func (x *ActivateRequest) UnmarshalJSON(b []byte) error
- func (x *ActivateRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ActivateRequest) UnmarshalVT(dAtA []byte) error
- type ActivateResponse
- func (m *ActivateResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ActivateResponse) CloneVT() *ActivateResponse
- func (this *ActivateResponse) EqualMessageVT(thatMsg any) bool
- func (this *ActivateResponse) EqualVT(that *ActivateResponse) bool
- func (x *ActivateResponse) MarshalJSON() ([]byte, error)
- func (x *ActivateResponse) MarshalProtoJSON(s *json.MarshalState)
- func (x *ActivateResponse) MarshalProtoText() string
- func (m *ActivateResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ActivateResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *ActivateResponse) MarshalVT() (dAtA []byte, err error)
- func (*ActivateResponse) ProtoMessage()
- func (x *ActivateResponse) Reset()
- func (m *ActivateResponse) SizeVT() (n int)
- func (x *ActivateResponse) String() string
- func (x *ActivateResponse) UnmarshalJSON(b []byte) error
- func (x *ActivateResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ActivateResponse) UnmarshalVT(dAtA []byte) error
- type Holder
- type PrepareRequest
- func (m *PrepareRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *PrepareRequest) CloneVT() *PrepareRequest
- func (this *PrepareRequest) EqualMessageVT(thatMsg any) bool
- func (this *PrepareRequest) EqualVT(that *PrepareRequest) bool
- func (x *PrepareRequest) GetInstanceKey() string
- func (x *PrepareRequest) GetManifestRoot() string
- func (x *PrepareRequest) GetPluginId() string
- func (x *PrepareRequest) MarshalJSON() ([]byte, error)
- func (x *PrepareRequest) MarshalProtoJSON(s *json.MarshalState)
- func (x *PrepareRequest) MarshalProtoText() string
- func (m *PrepareRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *PrepareRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *PrepareRequest) MarshalVT() (dAtA []byte, err error)
- func (*PrepareRequest) ProtoMessage()
- func (x *PrepareRequest) Reset()
- func (m *PrepareRequest) SizeVT() (n int)
- func (x *PrepareRequest) String() string
- func (x *PrepareRequest) UnmarshalJSON(b []byte) error
- func (x *PrepareRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *PrepareRequest) UnmarshalVT(dAtA []byte) error
- type PrepareResponse
- func (m *PrepareResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *PrepareResponse) CloneVT() *PrepareResponse
- func (this *PrepareResponse) EqualMessageVT(thatMsg any) bool
- func (this *PrepareResponse) EqualVT(that *PrepareResponse) bool
- func (x *PrepareResponse) GetResourceId() uint32
- func (x *PrepareResponse) MarshalJSON() ([]byte, error)
- func (x *PrepareResponse) MarshalProtoJSON(s *json.MarshalState)
- func (x *PrepareResponse) MarshalProtoText() string
- func (m *PrepareResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *PrepareResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *PrepareResponse) MarshalVT() (dAtA []byte, err error)
- func (*PrepareResponse) ProtoMessage()
- func (x *PrepareResponse) Reset()
- func (m *PrepareResponse) SizeVT() (n int)
- func (x *PrepareResponse) String() string
- func (x *PrepareResponse) UnmarshalJSON(b []byte) error
- func (x *PrepareResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *PrepareResponse) UnmarshalVT(dAtA []byte) error
- type RegisterFunc
- type SRPCGenerationServiceClient
- type SRPCGenerationServiceHandler
- func (SRPCGenerationServiceHandler) GetMethodIDs() []string
- func (d *SRPCGenerationServiceHandler) GetServiceID() string
- func (d *SRPCGenerationServiceHandler) InvokeMethod(serviceID, methodID string, strm srpc.Stream) (bool, error)
- func (SRPCGenerationServiceHandler) InvokeMethod_Activate(impl SRPCGenerationServiceServer, strm srpc.Stream) error
- type SRPCGenerationServiceServer
- type SRPCGenerationService_ActivateStream
- type SRPCRegistrationServiceClient
- type SRPCRegistrationServiceHandler
- func (SRPCRegistrationServiceHandler) GetMethodIDs() []string
- func (d *SRPCRegistrationServiceHandler) GetServiceID() string
- func (d *SRPCRegistrationServiceHandler) InvokeMethod(serviceID, methodID string, strm srpc.Stream) (bool, error)
- func (SRPCRegistrationServiceHandler) InvokeMethod_Prepare(impl SRPCRegistrationServiceServer, strm srpc.Stream) error
- type SRPCRegistrationServiceServer
- type SRPCRegistrationService_PrepareStream
Constants ¶
const SRPCGenerationServiceServiceID = "s4wave.plugin.registration.GenerationService"
const SRPCRegistrationServiceServiceID = "s4wave.plugin.registration.RegistrationService"
Variables ¶
This section is empty.
Functions ¶
func Activate ¶
Activate atomically replaces the plugin family's visible registrations with those made in scope.
func NewSRPCGenerationServiceHandler ¶
func NewSRPCGenerationServiceHandler(impl SRPCGenerationServiceServer, serviceID string) srpc.Handler
NewSRPCGenerationServiceHandler constructs a new RPC handler. serviceID: if empty, uses default: s4wave.plugin.registration.GenerationService
func NewSRPCRegistrationServiceHandler ¶
func NewSRPCRegistrationServiceHandler(impl SRPCRegistrationServiceServer, serviceID string) srpc.Handler
NewSRPCRegistrationServiceHandler constructs a new RPC handler. serviceID: if empty, uses default: s4wave.plugin.registration.RegistrationService
func PrepareGeneration ¶
func PrepareGeneration( ctx context.Context, b bus.Bus, core *resource_client.Client, root srpc.Client, ) (resource_client.ResourceRef, error)
PrepareGeneration opens the private registration scope of this Go plugin's generation beneath the core root Resource. The plugin host supplies the family, the immutable manifest, and the installation binding, so instances of the plugin in several Spaces never collide on capability names.
Registrations made through the returned scope stay hidden until Activate admits them together. Releasing the scope hides the whole generation. A historical worker publishes no current registrations and gets a nil scope.
func SRPCRegisterGenerationService ¶
func SRPCRegisterGenerationService(mux srpc.Mux, impl SRPCGenerationServiceServer) error
SRPCRegisterGenerationService registers the implementation with the mux. Uses the default serviceID: s4wave.plugin.registration.GenerationService
func SRPCRegisterRegistrationService ¶
func SRPCRegisterRegistrationService(mux srpc.Mux, impl SRPCRegistrationServiceServer) error
SRPCRegisterRegistrationService registers the implementation with the mux. Uses the default serviceID: s4wave.plugin.registration.RegistrationService
Types ¶
type ActivateRequest ¶
type ActivateRequest struct {
// contains filtered or unexported fields
}
ActivateRequest admits the registrations owned by the addressed scope.
func (*ActivateRequest) CloneMessageVT ¶
func (m *ActivateRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ActivateRequest) CloneVT ¶
func (m *ActivateRequest) CloneVT() *ActivateRequest
func (*ActivateRequest) EqualMessageVT ¶
func (this *ActivateRequest) EqualMessageVT(thatMsg any) bool
func (*ActivateRequest) EqualVT ¶
func (this *ActivateRequest) EqualVT(that *ActivateRequest) bool
func (*ActivateRequest) MarshalJSON ¶
func (x *ActivateRequest) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ActivateRequest to JSON.
func (*ActivateRequest) MarshalProtoJSON ¶
func (x *ActivateRequest) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ActivateRequest message to JSON.
func (*ActivateRequest) MarshalProtoText ¶
func (x *ActivateRequest) MarshalProtoText() string
func (*ActivateRequest) MarshalToSizedBufferVT ¶
func (m *ActivateRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ActivateRequest) MarshalToVT ¶
func (m *ActivateRequest) MarshalToVT(dAtA []byte) (int, error)
func (*ActivateRequest) MarshalVT ¶
func (m *ActivateRequest) MarshalVT() (dAtA []byte, err error)
func (*ActivateRequest) ProtoMessage ¶
func (*ActivateRequest) ProtoMessage()
func (*ActivateRequest) Reset ¶
func (x *ActivateRequest) Reset()
func (*ActivateRequest) SizeVT ¶
func (m *ActivateRequest) SizeVT() (n int)
func (*ActivateRequest) String ¶
func (x *ActivateRequest) String() string
func (*ActivateRequest) UnmarshalJSON ¶
func (x *ActivateRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ActivateRequest from JSON.
func (*ActivateRequest) UnmarshalProtoJSON ¶
func (x *ActivateRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ActivateRequest message from JSON.
func (*ActivateRequest) UnmarshalVT ¶
func (m *ActivateRequest) UnmarshalVT(dAtA []byte) error
type ActivateResponse ¶
type ActivateResponse struct {
// contains filtered or unexported fields
}
ActivateResponse confirms that the complete generation is visible.
func (*ActivateResponse) CloneMessageVT ¶
func (m *ActivateResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ActivateResponse) CloneVT ¶
func (m *ActivateResponse) CloneVT() *ActivateResponse
func (*ActivateResponse) EqualMessageVT ¶
func (this *ActivateResponse) EqualMessageVT(thatMsg any) bool
func (*ActivateResponse) EqualVT ¶
func (this *ActivateResponse) EqualVT(that *ActivateResponse) bool
func (*ActivateResponse) MarshalJSON ¶
func (x *ActivateResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ActivateResponse to JSON.
func (*ActivateResponse) MarshalProtoJSON ¶
func (x *ActivateResponse) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ActivateResponse message to JSON.
func (*ActivateResponse) MarshalProtoText ¶
func (x *ActivateResponse) MarshalProtoText() string
func (*ActivateResponse) MarshalToSizedBufferVT ¶
func (m *ActivateResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ActivateResponse) MarshalToVT ¶
func (m *ActivateResponse) MarshalToVT(dAtA []byte) (int, error)
func (*ActivateResponse) MarshalVT ¶
func (m *ActivateResponse) MarshalVT() (dAtA []byte, err error)
func (*ActivateResponse) ProtoMessage ¶
func (*ActivateResponse) ProtoMessage()
func (*ActivateResponse) Reset ¶
func (x *ActivateResponse) Reset()
func (*ActivateResponse) SizeVT ¶
func (m *ActivateResponse) SizeVT() (n int)
func (*ActivateResponse) String ¶
func (x *ActivateResponse) String() string
func (*ActivateResponse) UnmarshalJSON ¶
func (x *ActivateResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ActivateResponse from JSON.
func (*ActivateResponse) UnmarshalProtoJSON ¶
func (x *ActivateResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ActivateResponse message from JSON.
func (*ActivateResponse) UnmarshalVT ¶
func (m *ActivateResponse) UnmarshalVT(dAtA []byte) error
type Holder ¶
type Holder struct {
// contains filtered or unexported fields
}
Holder publishes a Go plugin's capabilities on the core plugin. A startup controller embeds a Holder and calls Hold from Execute, so the plugin reports ready only after its first registration pass settles.
func NewHolder ¶
func NewHolder(register RegisterFunc) *Holder
NewHolder constructs a Holder that registers with register.
func (*Holder) Hold ¶
Hold publishes this Go plugin's capabilities on the core plugin until ctx ends. It registers in the plugin's private generation, then admits the registrations together, so a Space plugin's capabilities route to its own installation. A historical worker registers nothing and waits for ctx.
type PrepareRequest ¶
type PrepareRequest struct {
// PluginId names the plugin family whose registrations are replaced together.
PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"pluginId,omitempty"`
// ManifestRoot identifies the exact executable behind this generation.
ManifestRoot string `protobuf:"bytes,2,opt,name=manifest_root,json=manifestRoot,proto3" json:"manifestRoot,omitempty"`
// InstanceKey scopes admission to the host's logical installation binding.
// Empty registers globally; a Space supplies its World engine ID.
InstanceKey string `protobuf:"bytes,3,opt,name=instance_key,json=instanceKey,proto3" json:"instanceKey,omitempty"`
// contains filtered or unexported fields
}
PrepareRequest identifies the immutable implementation being registered.
func (*PrepareRequest) CloneMessageVT ¶
func (m *PrepareRequest) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*PrepareRequest) CloneVT ¶
func (m *PrepareRequest) CloneVT() *PrepareRequest
func (*PrepareRequest) EqualMessageVT ¶
func (this *PrepareRequest) EqualMessageVT(thatMsg any) bool
func (*PrepareRequest) EqualVT ¶
func (this *PrepareRequest) EqualVT(that *PrepareRequest) bool
func (*PrepareRequest) GetInstanceKey ¶
func (x *PrepareRequest) GetInstanceKey() string
func (*PrepareRequest) GetManifestRoot ¶
func (x *PrepareRequest) GetManifestRoot() string
func (*PrepareRequest) GetPluginId ¶
func (x *PrepareRequest) GetPluginId() string
func (*PrepareRequest) MarshalJSON ¶
func (x *PrepareRequest) MarshalJSON() ([]byte, error)
MarshalJSON marshals the PrepareRequest to JSON.
func (*PrepareRequest) MarshalProtoJSON ¶
func (x *PrepareRequest) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the PrepareRequest message to JSON.
func (*PrepareRequest) MarshalProtoText ¶
func (x *PrepareRequest) MarshalProtoText() string
func (*PrepareRequest) MarshalToSizedBufferVT ¶
func (m *PrepareRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*PrepareRequest) MarshalToVT ¶
func (m *PrepareRequest) MarshalToVT(dAtA []byte) (int, error)
func (*PrepareRequest) MarshalVT ¶
func (m *PrepareRequest) MarshalVT() (dAtA []byte, err error)
func (*PrepareRequest) ProtoMessage ¶
func (*PrepareRequest) ProtoMessage()
func (*PrepareRequest) Reset ¶
func (x *PrepareRequest) Reset()
func (*PrepareRequest) SizeVT ¶
func (m *PrepareRequest) SizeVT() (n int)
func (*PrepareRequest) String ¶
func (x *PrepareRequest) String() string
func (*PrepareRequest) UnmarshalJSON ¶
func (x *PrepareRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the PrepareRequest from JSON.
func (*PrepareRequest) UnmarshalProtoJSON ¶
func (x *PrepareRequest) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the PrepareRequest message from JSON.
func (*PrepareRequest) UnmarshalVT ¶
func (m *PrepareRequest) UnmarshalVT(dAtA []byte) error
type PrepareResponse ¶
type PrepareResponse struct {
// ResourceId serves the existing registries and GenerationService. Releasing
// it hides its registrations, including an activated generation.
ResourceId uint32 `protobuf:"varint,1,opt,name=resource_id,json=resourceId,proto3" json:"resourceId,omitempty"`
// contains filtered or unexported fields
}
PrepareResponse retains the private registration scope.
func (*PrepareResponse) CloneMessageVT ¶
func (m *PrepareResponse) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*PrepareResponse) CloneVT ¶
func (m *PrepareResponse) CloneVT() *PrepareResponse
func (*PrepareResponse) EqualMessageVT ¶
func (this *PrepareResponse) EqualMessageVT(thatMsg any) bool
func (*PrepareResponse) EqualVT ¶
func (this *PrepareResponse) EqualVT(that *PrepareResponse) bool
func (*PrepareResponse) GetResourceId ¶
func (x *PrepareResponse) GetResourceId() uint32
func (*PrepareResponse) MarshalJSON ¶
func (x *PrepareResponse) MarshalJSON() ([]byte, error)
MarshalJSON marshals the PrepareResponse to JSON.
func (*PrepareResponse) MarshalProtoJSON ¶
func (x *PrepareResponse) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the PrepareResponse message to JSON.
func (*PrepareResponse) MarshalProtoText ¶
func (x *PrepareResponse) MarshalProtoText() string
func (*PrepareResponse) MarshalToSizedBufferVT ¶
func (m *PrepareResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*PrepareResponse) MarshalToVT ¶
func (m *PrepareResponse) MarshalToVT(dAtA []byte) (int, error)
func (*PrepareResponse) MarshalVT ¶
func (m *PrepareResponse) MarshalVT() (dAtA []byte, err error)
func (*PrepareResponse) ProtoMessage ¶
func (*PrepareResponse) ProtoMessage()
func (*PrepareResponse) Reset ¶
func (x *PrepareResponse) Reset()
func (*PrepareResponse) SizeVT ¶
func (m *PrepareResponse) SizeVT() (n int)
func (*PrepareResponse) String ¶
func (x *PrepareResponse) String() string
func (*PrepareResponse) UnmarshalJSON ¶
func (x *PrepareResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the PrepareResponse from JSON.
func (*PrepareResponse) UnmarshalProtoJSON ¶
func (x *PrepareResponse) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the PrepareResponse message from JSON.
func (*PrepareResponse) UnmarshalVT ¶
func (m *PrepareResponse) UnmarshalVT(dAtA []byte) error
type RegisterFunc ¶
type RegisterFunc func( ctx context.Context, client *resource_client.Client, scope srpc.Client, ) ([]resource_client.ResourceRef, error)
RegisterFunc makes a plugin's registrations through scope and returns the references that hold them, including those made before an error. client owns every returned reference.
type SRPCGenerationServiceClient ¶
type SRPCGenerationServiceClient interface {
// SRPCClient returns the underlying SRPC client.
SRPCClient() srpc.Client
// Activate atomically replaces the current group for this plugin family.
Activate(ctx context.Context, in *ActivateRequest) (*ActivateResponse, error)
}
func NewSRPCGenerationServiceClient ¶
func NewSRPCGenerationServiceClient(cc srpc.Client) SRPCGenerationServiceClient
func NewSRPCGenerationServiceClientWithServiceID ¶
func NewSRPCGenerationServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCGenerationServiceClient
type SRPCGenerationServiceHandler ¶
type SRPCGenerationServiceHandler struct {
// contains filtered or unexported fields
}
func (SRPCGenerationServiceHandler) GetMethodIDs ¶
func (SRPCGenerationServiceHandler) GetMethodIDs() []string
func (*SRPCGenerationServiceHandler) GetServiceID ¶
func (d *SRPCGenerationServiceHandler) GetServiceID() string
func (*SRPCGenerationServiceHandler) InvokeMethod ¶
func (SRPCGenerationServiceHandler) InvokeMethod_Activate ¶
func (SRPCGenerationServiceHandler) InvokeMethod_Activate(impl SRPCGenerationServiceServer, strm srpc.Stream) error
type SRPCGenerationServiceServer ¶
type SRPCGenerationServiceServer interface {
// Activate atomically replaces the current group for this plugin family.
Activate(context.Context, *ActivateRequest) (*ActivateResponse, error)
}
type SRPCRegistrationServiceClient ¶
type SRPCRegistrationServiceClient interface {
// SRPCClient returns the underlying SRPC client.
SRPCClient() srpc.Client
// Prepare returns a private registration scope for one executable generation.
Prepare(ctx context.Context, in *PrepareRequest) (*PrepareResponse, error)
}
func NewSRPCRegistrationServiceClient ¶
func NewSRPCRegistrationServiceClient(cc srpc.Client) SRPCRegistrationServiceClient
func NewSRPCRegistrationServiceClientWithServiceID ¶
func NewSRPCRegistrationServiceClientWithServiceID(cc srpc.Client, serviceID string) SRPCRegistrationServiceClient
type SRPCRegistrationServiceHandler ¶
type SRPCRegistrationServiceHandler struct {
// contains filtered or unexported fields
}
func (SRPCRegistrationServiceHandler) GetMethodIDs ¶
func (SRPCRegistrationServiceHandler) GetMethodIDs() []string
func (*SRPCRegistrationServiceHandler) GetServiceID ¶
func (d *SRPCRegistrationServiceHandler) GetServiceID() string
func (*SRPCRegistrationServiceHandler) InvokeMethod ¶
func (SRPCRegistrationServiceHandler) InvokeMethod_Prepare ¶
func (SRPCRegistrationServiceHandler) InvokeMethod_Prepare(impl SRPCRegistrationServiceServer, strm srpc.Stream) error
type SRPCRegistrationServiceServer ¶
type SRPCRegistrationServiceServer interface {
// Prepare returns a private registration scope for one executable generation.
Prepare(context.Context, *PrepareRequest) (*PrepareResponse, error)
}