Documentation ¶
Overview ¶
Package discovery implements the Cloudstate entity discovery server.
Index ¶
- Constants
- type EntityDiscoveryServer
- func (s *EntityDiscoveryServer) Discover(_ context.Context, info *protocol.ProxyInfo) (*protocol.EntitySpec, error)
- func (s *EntityDiscoveryServer) RegisterCRDTEntity(entity *crdt.Entity, config protocol.DescriptorConfig) error
- func (s *EntityDiscoveryServer) RegisterEventSourcedEntity(entity *eventsourced.Entity, config protocol.DescriptorConfig) error
- func (s *EntityDiscoveryServer) ReportError(_ context.Context, error *protocol.UserFunctionError) (*empty.Empty, error)
Constants ¶
View Source
const ( SupportLibraryName = "cloudstate-go-support" SupportLibraryVersion = "0.2.0" ProtocolMajorVersion = 0 ProtocolMinorVersion = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityDiscoveryServer ¶
type EntityDiscoveryServer struct {
// contains filtered or unexported fields
}
EntityDiscoveryServer implements the Cloudstate discovery protocol.
func NewServer ¶
func NewServer(config protocol.Config) *EntityDiscoveryServer
NewServer returns a new and initialized EntityDiscoveryServer.
func (*EntityDiscoveryServer) Discover ¶
func (s *EntityDiscoveryServer) Discover(_ context.Context, info *protocol.ProxyInfo) (*protocol.EntitySpec, error)
Discover returns an entity spec for registered entities.
func (*EntityDiscoveryServer) RegisterCRDTEntity ¶
func (s *EntityDiscoveryServer) RegisterCRDTEntity(entity *crdt.Entity, config protocol.DescriptorConfig) error
func (*EntityDiscoveryServer) RegisterEventSourcedEntity ¶
func (s *EntityDiscoveryServer) RegisterEventSourcedEntity(entity *eventsourced.Entity, config protocol.DescriptorConfig) error
func (*EntityDiscoveryServer) ReportError ¶
func (s *EntityDiscoveryServer) ReportError(_ context.Context, error *protocol.UserFunctionError) (*empty.Empty, error)
ReportError logs any user function error reported by the Cloudstate proxy.
Click to show internal directories.
Click to hide internal directories.