Documentation
¶
Overview ¶
Package cloudstate implements the Cloudstate event sourced and entity discovery protocol.
Index ¶
- Variables
- type CloudState
- func (cs *CloudState) RegisterAction(entity *action.Entity, config protocol.DescriptorConfig) error
- func (cs *CloudState) RegisterCRDT(entity *crdt.Entity, config protocol.DescriptorConfig, options ...crdt.Option) error
- func (cs *CloudState) RegisterEventSourced(entity *eventsourced.Entity, config protocol.DescriptorConfig, ...) error
- func (cs *CloudState) RegisterValueEntity(entity *value.Entity, config protocol.DescriptorConfig, ...) error
- func (cs *CloudState) Run() error
- func (cs *CloudState) RunWithListener(lis net.Listener) error
- func (cs *CloudState) Stop()
- type EventDestination
- func (*EventDestination) Descriptor() ([]byte, []int)deprecated
- func (m *EventDestination) GetDestination() isEventDestination_Destination
- func (x *EventDestination) GetTopic() string
- func (*EventDestination) ProtoMessage()
- func (x *EventDestination) ProtoReflect() protoreflect.Message
- func (x *EventDestination) Reset()
- func (x *EventDestination) String() string
- type EventDestination_Topic
- type EventSource
- func (*EventSource) Descriptor() ([]byte, []int)deprecated
- func (x *EventSource) GetConsumerGroup() string
- func (x *EventSource) GetEventLog() string
- func (m *EventSource) GetSource() isEventSource_Source
- func (x *EventSource) GetTopic() string
- func (*EventSource) ProtoMessage()
- func (x *EventSource) ProtoReflect() protoreflect.Message
- func (x *EventSource) Reset()
- func (x *EventSource) String() string
- type EventSource_EventLog
- type EventSource_Topic
- type Eventing
Constants ¶
This section is empty.
Variables ¶
var (
// optional bool entity_key = 1080;
E_EntityKey = &file_cloudstate_entity_key_proto_extTypes[0]
)
Extension fields to descriptor.FieldOptions.
var (
// optional cloudstate.Eventing eventing = 1081;
E_Eventing = &file_cloudstate_eventing_proto_extTypes[0]
)
Extension fields to descriptor.MethodOptions.
var (
// optional bool legacy_entity_key = 50002;
E_LegacyEntityKey = &file_cloudstate_legacy_entity_key_proto_extTypes[0]
)
Extension fields to descriptor.FieldOptions.
var File_cloudstate_entity_key_proto protoreflect.FileDescriptor
var File_cloudstate_eventing_proto protoreflect.FileDescriptor
var File_cloudstate_legacy_entity_key_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CloudState ¶
type CloudState struct {
// contains filtered or unexported fields
}
CloudState is an instance of a Cloudstate User Function.
func (*CloudState) RegisterAction ¶ added in v0.3.0
func (cs *CloudState) RegisterAction(entity *action.Entity, config protocol.DescriptorConfig) error
RegisterAction registers an action entity.
func (*CloudState) RegisterCRDT ¶ added in v0.2.0
func (cs *CloudState) RegisterCRDT(entity *crdt.Entity, config protocol.DescriptorConfig, options ...crdt.Option) error
RegisterCRDT registers a CRDT entity.
func (*CloudState) RegisterEventSourced ¶ added in v0.2.0
func (cs *CloudState) RegisterEventSourced(entity *eventsourced.Entity, config protocol.DescriptorConfig, options ...eventsourced.Option) error
RegisterEventSourced registers an event sourced entity.
func (*CloudState) RegisterValueEntity ¶ added in v0.3.0
func (cs *CloudState) RegisterValueEntity(entity *value.Entity, config protocol.DescriptorConfig, options ...value.Option) error
RegisterValueEntity registers a Value entity.
func (*CloudState) Run ¶
func (cs *CloudState) Run() error
Run runs the CloudState instance on the interface and port defined by the HOST and PORT environment variable.
func (*CloudState) RunWithListener ¶ added in v0.2.0
func (cs *CloudState) RunWithListener(lis net.Listener) error
Run runs the CloudState instance with a listener provided.
func (*CloudState) Stop ¶ added in v0.2.0
func (cs *CloudState) Stop()
Stop gracefully stops the Cloudstate instance.
type EventDestination ¶ added in v0.3.0
type EventDestination struct { // Types that are assignable to Destination: // *EventDestination_Topic Destination isEventDestination_Destination `protobuf_oneof:"destination"` // contains filtered or unexported fields }
func (*EventDestination) Descriptor
deprecated
added in
v0.3.0
func (*EventDestination) Descriptor() ([]byte, []int)
Deprecated: Use EventDestination.ProtoReflect.Descriptor instead.
func (*EventDestination) GetDestination ¶ added in v0.3.0
func (m *EventDestination) GetDestination() isEventDestination_Destination
func (*EventDestination) GetTopic ¶ added in v0.3.0
func (x *EventDestination) GetTopic() string
func (*EventDestination) ProtoMessage ¶ added in v0.3.0
func (*EventDestination) ProtoMessage()
func (*EventDestination) ProtoReflect ¶ added in v0.3.0
func (x *EventDestination) ProtoReflect() protoreflect.Message
func (*EventDestination) Reset ¶ added in v0.3.0
func (x *EventDestination) Reset()
func (*EventDestination) String ¶ added in v0.3.0
func (x *EventDestination) String() string
type EventDestination_Topic ¶ added in v0.3.0
type EventDestination_Topic struct {
Topic string `protobuf:"bytes,1,opt,name=topic,proto3,oneof"`
}
type EventSource ¶ added in v0.3.0
type EventSource struct { // The consumer group id. // // By default, all rpc methods on a given service with the same source will be part of the same virtual consumer // group, messages will be routed to the different methods by type. This can be used to override that, if you want // multiple methods to act as independent consumers of the same source (ie, if you want the same event to be // published to each consumer) then give each consumer a unique name. // // Note that this does depend on the event source supporting multiple consumer groups. Queue based event sources // may not support this. ConsumerGroup string `protobuf:"bytes,1,opt,name=consumer_group,json=consumerGroup,proto3" json:"consumer_group,omitempty"` // Types that are assignable to Source: // *EventSource_Topic // *EventSource_EventLog Source isEventSource_Source `protobuf_oneof:"source"` // contains filtered or unexported fields }
Event source configuration
func (*EventSource) Descriptor
deprecated
added in
v0.3.0
func (*EventSource) Descriptor() ([]byte, []int)
Deprecated: Use EventSource.ProtoReflect.Descriptor instead.
func (*EventSource) GetConsumerGroup ¶ added in v0.3.0
func (x *EventSource) GetConsumerGroup() string
func (*EventSource) GetEventLog ¶ added in v0.3.0
func (x *EventSource) GetEventLog() string
func (*EventSource) GetSource ¶ added in v0.3.0
func (m *EventSource) GetSource() isEventSource_Source
func (*EventSource) GetTopic ¶ added in v0.3.0
func (x *EventSource) GetTopic() string
func (*EventSource) ProtoMessage ¶ added in v0.3.0
func (*EventSource) ProtoMessage()
func (*EventSource) ProtoReflect ¶ added in v0.3.0
func (x *EventSource) ProtoReflect() protoreflect.Message
func (*EventSource) Reset ¶ added in v0.3.0
func (x *EventSource) Reset()
func (*EventSource) String ¶ added in v0.3.0
func (x *EventSource) String() string
type EventSource_EventLog ¶ added in v0.3.0
type EventSource_EventLog struct { // An event log source. // // This will consume events from the given event log with the given persistence id. EventLog string `protobuf:"bytes,3,opt,name=event_log,json=eventLog,proto3,oneof"` }
type EventSource_Topic ¶ added in v0.3.0
type EventSource_Topic struct { // A topic source. // // This will consume events from the given topic name. Topic string `protobuf:"bytes,2,opt,name=topic,proto3,oneof"` }
type Eventing ¶ added in v0.3.0
type Eventing struct { // The event source in configuration. In *EventSource `protobuf:"bytes,1,opt,name=in,proto3" json:"in,omitempty"` // The event destination out configuration. // // Optional, if unset, messages out will not be published anywhere. Out *EventDestination `protobuf:"bytes,2,opt,name=out,proto3" json:"out,omitempty"` // contains filtered or unexported fields }
Eventing configuration for a gRPC method.
func (*Eventing) Descriptor
deprecated
added in
v0.3.0
func (*Eventing) GetIn ¶ added in v0.3.0
func (x *Eventing) GetIn() *EventSource
func (*Eventing) GetOut ¶ added in v0.3.0
func (x *Eventing) GetOut() *EventDestination
func (*Eventing) ProtoMessage ¶ added in v0.3.0
func (*Eventing) ProtoMessage()
func (*Eventing) ProtoReflect ¶ added in v0.3.0
func (x *Eventing) ProtoReflect() protoreflect.Message
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package action implements the Cloudstate Action protocol.
|
Package action implements the Cloudstate Action protocol. |
Package crdt implements the Cloudstate CRDT state model support.
|
Package crdt implements the Cloudstate CRDT state model support. |
Package discovery implements the Cloudstate entity discovery server.
|
Package discovery implements the Cloudstate entity discovery server. |
Package encoding implements the cloudstate Any encoding support.
|
Package encoding implements the cloudstate Any encoding support. |
Package eventsourced implements the Cloudstate eventsourcing state model.
|
Package eventsourced implements the Cloudstate eventsourcing state model. |