Versions in this module Expand all Collapse all v0 v0.6.1 Aug 17, 2024 v0.6.0 Aug 14, 2024 Changes in this version + const LocalhostPhysicalAddress + var File_process_id_proto protoreflect.FileDescriptor + var File_shared_proto protoreflect.FileDescriptor + var Shared_ServiceDesc = grpc.ServiceDesc + func RegisterSharedServer(s grpc.ServiceRegistrar, srv SharedServer) + type BatchDeliveryMessage struct + Messages []*DeliveryMessage + func (*BatchDeliveryMessage) Descriptor() ([]byte, []int) + func (*BatchDeliveryMessage) ProtoMessage() + func (x *BatchDeliveryMessage) GetMessages() []*DeliveryMessage + func (x *BatchDeliveryMessage) ProtoReflect() protoreflect.Message + func (x *BatchDeliveryMessage) Reset() + func (x *BatchDeliveryMessage) String() string + type DeliveryMessage struct + MessageData []byte + MessageType string + Receiver *ProcessId + Sender *ProcessId + System bool + func (*DeliveryMessage) Descriptor() ([]byte, []int) + func (*DeliveryMessage) ProtoMessage() + func (x *DeliveryMessage) GetMessageData() []byte + func (x *DeliveryMessage) GetMessageType() string + func (x *DeliveryMessage) GetReceiver() *ProcessId + func (x *DeliveryMessage) GetSender() *ProcessId + func (x *DeliveryMessage) GetSystem() bool + func (x *DeliveryMessage) ProtoReflect() protoreflect.Message + func (x *DeliveryMessage) Reset() + func (x *DeliveryMessage) String() string + type ErrorPolicyDecisionHandler = toolkit.ErrorPolicyDecisionHandler[SharedPolicyDecision] + type Farewell struct + Address string + func (*Farewell) Descriptor() ([]byte, []int) + func (*Farewell) ProtoMessage() + func (x *Farewell) GetAddress() string + func (x *Farewell) ProtoReflect() protoreflect.Message + func (x *Farewell) Reset() + func (x *Farewell) String() string + type FunctionalErrorPolicyDecisionHandler = toolkit.FunctionalErrorPolicyDecisionHandler[SharedPolicyDecision] + type FunctionalGRPCLaunchBeforeHook func(server *grpc.Server) + func (f FunctionalGRPCLaunchBeforeHook) OnGRPCLaunchBefore(server *grpc.Server) + type FunctionalPhysicalAddressResolver func(id *ProcessId) Process + func (f FunctionalPhysicalAddressResolver) Resolve(id *ProcessId) Process + type FunctionalResourceControllerConfigurator func(config *ResourceControllerConfiguration) + func (f FunctionalResourceControllerConfigurator) Configure(config *ResourceControllerConfiguration) + type FunctionalShareOpenedHook func(target PhysicalAddress) + func (f FunctionalShareOpenedHook) OnShareOpened(target PhysicalAddress) + type FunctionalSharedClosedHook func(target PhysicalAddress) + func (f FunctionalSharedClosedHook) OnShareClosed(target PhysicalAddress) + type FunctionalSharedConfigurator func(config *SharedConfiguration) + func (f FunctionalSharedConfigurator) Configure(config *SharedConfiguration) + type FunctionalSharedStartHook func() + func (f FunctionalSharedStartHook) OnSharedStart() + type GRPCLaunchBeforeHook interface + OnGRPCLaunchBefore func(server *grpc.Server) + type Handshake struct + Address string + func (*Handshake) Descriptor() ([]byte, []int) + func (*Handshake) ProtoMessage() + func (x *Handshake) GetAddress() string + func (x *Handshake) ProtoReflect() protoreflect.Message + func (x *Handshake) Reset() + func (x *Handshake) String() string + type LogicalAddress = string + type Message = any + type PhysicalAddress = string + type PhysicalAddressResolver interface + Resolve func(id *ProcessId) Process + type Process interface + DeliverySystemMessage func(receiver, sender, forward *ProcessId, message Message) + DeliveryUserMessage func(receiver, sender, forward *ProcessId, message Message) + Initialize func(rc *ResourceController, id *ProcessId) + IsTerminated func() bool + Terminate func(source *ProcessId) + type ProcessId struct + LogicalAddress string + PhysicalAddress string + func NewProcessId(physicalAddress PhysicalAddress, logicalAddress LogicalAddress) *ProcessId + func (*ProcessId) Descriptor() ([]byte, []int) + func (*ProcessId) ProtoMessage() + func (pid *ProcessId) Clone() *ProcessId + func (pid *ProcessId) Derivation(name string) *ProcessId + func (pid *ProcessId) Equal(id *ProcessId) bool + func (pid *ProcessId) GetLogicalAddress() LogicalAddress + func (pid *ProcessId) GetPhysicalAddress() PhysicalAddress + func (pid *ProcessId) URL() *url.URL + func (x *ProcessId) ProtoReflect() protoreflect.Message + func (x *ProcessId) Reset() + func (x *ProcessId) String() string + type ResourceController struct + func NewResourceController(configurator ...ResourceControllerConfigurator) *ResourceController + func (rc *ResourceController) Belong(id *ProcessId) bool + func (rc *ResourceController) GetPhysicalAddress() PhysicalAddress + func (rc *ResourceController) GetProcess(id *ProcessId) (process Process) + func (rc *ResourceController) Register(id *ProcessId, process Process) (pid *ProcessId, exist bool) + func (rc *ResourceController) RegisterResolver(resolver ...PhysicalAddressResolver) + func (rc *ResourceController) Unregister(killer *ProcessId, target *ProcessId) + type ResourceControllerConfiguration struct + func (c *ResourceControllerConfiguration) WithLoggerProvider(provider log.LoggerProvider) *ResourceControllerConfiguration + func (c *ResourceControllerConfiguration) WithNotFoundSubstitute(substitute Process) *ResourceControllerConfiguration + func (c *ResourceControllerConfiguration) WithPhysicalAddress(address PhysicalAddress) *ResourceControllerConfiguration + type ResourceControllerConfigurator interface + Configure func(config *ResourceControllerConfiguration) + type ShareOpenedHook interface + OnShareOpened func(target PhysicalAddress) + type Shared struct + func NewShared(rc *ResourceController, configurator ...SharedConfigurator) *Shared + func (s *Shared) Close(err ...error) + func (s *Shared) Dead() + func (s *Shared) GetCodec() codec.Codec + func (s *Shared) GetResourceController() *ResourceController + func (s *Shared) Share() error + type SharedClient interface + StreamHandler func(ctx context.Context, opts ...grpc.CallOption) (Shared_StreamHandlerClient, error) + func NewSharedClient(cc grpc.ClientConnInterface) SharedClient + type SharedClosedHook interface + OnShareClosed func(target PhysicalAddress) + type SharedConfiguration struct + func (c *SharedConfiguration) WithCodec(codec codec.Codec) *SharedConfiguration + func (c *SharedConfiguration) WithConsecutiveRestartLimit(limit int) *SharedConfiguration + func (c *SharedConfiguration) WithFixedRestartInterval(interval time.Duration) *SharedConfiguration + func (c *SharedConfiguration) WithGRPCLaunchBeforeHooks(hooks ...GRPCLaunchBeforeHook) *SharedConfiguration + func (c *SharedConfiguration) WithRestartInterval(baseDelay, maxDelay time.Duration) *SharedConfiguration + func (c *SharedConfiguration) WithRuntimeErrorHandler(handler ErrorPolicyDecisionHandler) *SharedConfiguration + func (c *SharedConfiguration) WithShareClosedHooks(hooks ...SharedClosedHook) *SharedConfiguration + func (c *SharedConfiguration) WithShareOpenedHooks(hooks ...ShareOpenedHook) *SharedConfiguration + func (c *SharedConfiguration) WithSharedHook(hook SharedStartHook) *SharedConfiguration + func (c *SharedConfiguration) WithUnknownReceiverRedirect(redirect func(message Message) *ProcessId) *SharedConfiguration + type SharedConfigurator interface + Configure func(config *SharedConfiguration) + type SharedErrorMessage struct + Message string + func (*SharedErrorMessage) Descriptor() ([]byte, []int) + func (*SharedErrorMessage) ProtoMessage() + func (x *SharedErrorMessage) GetMessage() string + func (x *SharedErrorMessage) ProtoReflect() protoreflect.Message + func (x *SharedErrorMessage) Reset() + func (x *SharedErrorMessage) String() string + type SharedMessage struct + MessageType isSharedMessage_MessageType + func (*SharedMessage) Descriptor() ([]byte, []int) + func (*SharedMessage) ProtoMessage() + func (m *SharedMessage) GetMessageType() isSharedMessage_MessageType + func (x *SharedMessage) GetBatchDeliveryMessage() *BatchDeliveryMessage + func (x *SharedMessage) GetDeliveryMessage() *DeliveryMessage + func (x *SharedMessage) GetFarewell() *Farewell + func (x *SharedMessage) GetHandshake() *Handshake + func (x *SharedMessage) ProtoReflect() protoreflect.Message + func (x *SharedMessage) Reset() + func (x *SharedMessage) String() string + type SharedMessage_BatchDeliveryMessage struct + BatchDeliveryMessage *BatchDeliveryMessage + type SharedMessage_DeliveryMessage struct + DeliveryMessage *DeliveryMessage + type SharedMessage_Farewell struct + Farewell *Farewell + type SharedMessage_Handshake struct + Handshake *Handshake + type SharedPolicyDecision uint8 + const SharedPolicyDecisionRestart + const SharedPolicyDecisionStop + type SharedServer interface + StreamHandler func(Shared_StreamHandlerServer) error + type SharedStartHook interface + OnSharedStart func() + type Shared_StreamHandlerClient interface + Recv func() (*SharedMessage, error) + Send func(*SharedMessage) error + type Shared_StreamHandlerServer interface + Recv func() (*SharedMessage, error) + Send func(*SharedMessage) error + type UnimplementedSharedServer struct + func (UnimplementedSharedServer) StreamHandler(Shared_StreamHandlerServer) error + type UnsafeSharedServer interface