Documentation
¶
Index ¶
- Variables
- func RegisterEventLogSubscriberModelServer(s grpc.ServiceRegistrar, srv EventLogSubscriberModelServer)
- func RegisterEventSourcedEntityOneServer(s grpc.ServiceRegistrar, srv EventSourcedEntityOneServer)
- func RegisterEventSourcedEntityTwoServer(s grpc.ServiceRegistrar, srv EventSourcedEntityTwoServer)
- type EffectRequest
- func (*EffectRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EffectRequest) GetId() string
- func (x *EffectRequest) GetMessage() string
- func (*EffectRequest) ProtoMessage()
- func (x *EffectRequest) ProtoReflect() protoreflect.Message
- func (x *EffectRequest) Reset()
- func (x *EffectRequest) String() string
- type EmitEventRequest
- func (*EmitEventRequest) Descriptor() ([]byte, []int)deprecated
- func (m *EmitEventRequest) GetEvent() isEmitEventRequest_Event
- func (x *EmitEventRequest) GetEventOne() *EventOne
- func (x *EmitEventRequest) GetEventTwo() *EventTwo
- func (x *EmitEventRequest) GetId() string
- func (*EmitEventRequest) ProtoMessage()
- func (x *EmitEventRequest) ProtoReflect() protoreflect.Message
- func (x *EmitEventRequest) Reset()
- func (x *EmitEventRequest) String() string
- type EmitEventRequest_EventOne
- type EmitEventRequest_EventTwo
- type EventLogSubscriberModel
- type EventLogSubscriberModelClient
- type EventLogSubscriberModelServer
- type EventLogSubscriberModel_ProcessEventTwoClient
- type EventLogSubscriberModel_ProcessEventTwoServer
- type EventOne
- type EventSourcedEntityOne
- type EventSourcedEntityOneClient
- type EventSourcedEntityOneServer
- type EventSourcedEntityTwo
- type EventSourcedEntityTwoClient
- type EventSourcedEntityTwoServer
- type EventTwo
- type Forward
- type JsonEvent
- type JsonMessage
- type ProcessStep
- func (*ProcessStep) Descriptor() ([]byte, []int)deprecated
- func (x *ProcessStep) GetForward() *Forward
- func (x *ProcessStep) GetReply() *Reply
- func (m *ProcessStep) GetStep() isProcessStep_Step
- func (*ProcessStep) ProtoMessage()
- func (x *ProcessStep) ProtoReflect() protoreflect.Message
- func (x *ProcessStep) Reset()
- func (x *ProcessStep) String() string
- type ProcessStep_Forward
- type ProcessStep_Reply
- type Reply
- type Response
- type UnimplementedEventLogSubscriberModelServer
- func (UnimplementedEventLogSubscriberModelServer) Effect(context.Context, *EffectRequest) (*Response, error)
- func (UnimplementedEventLogSubscriberModelServer) ProcessAnyEvent(context.Context, *any.Any) (*Response, error)
- func (UnimplementedEventLogSubscriberModelServer) ProcessEventOne(context.Context, *EventOne) (*Response, error)
- func (UnimplementedEventLogSubscriberModelServer) ProcessEventTwo(*EventTwo, EventLogSubscriberModel_ProcessEventTwoServer) error
- type UnimplementedEventSourcedEntityOneServer
- type UnimplementedEventSourcedEntityTwoServer
- type UnsafeEventLogSubscriberModelServer
- type UnsafeEventSourcedEntityOneServer
- type UnsafeEventSourcedEntityTwoServer
Constants ¶
This section is empty.
Variables ¶
var File_eventlogeventing_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventLogSubscriberModelServer ¶
func RegisterEventLogSubscriberModelServer(s grpc.ServiceRegistrar, srv EventLogSubscriberModelServer)
func RegisterEventSourcedEntityOneServer ¶
func RegisterEventSourcedEntityOneServer(s grpc.ServiceRegistrar, srv EventSourcedEntityOneServer)
func RegisterEventSourcedEntityTwoServer ¶
func RegisterEventSourcedEntityTwoServer(s grpc.ServiceRegistrar, srv EventSourcedEntityTwoServer)
Types ¶
type EffectRequest ¶
type EffectRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The `EffectRequest` message must contain the id from the SideEffect or Forward.
func (*EffectRequest) Descriptor
deprecated
func (*EffectRequest) Descriptor() ([]byte, []int)
Deprecated: Use EffectRequest.ProtoReflect.Descriptor instead.
func (*EffectRequest) GetId ¶
func (x *EffectRequest) GetId() string
func (*EffectRequest) GetMessage ¶
func (x *EffectRequest) GetMessage() string
func (*EffectRequest) ProtoMessage ¶
func (*EffectRequest) ProtoMessage()
func (*EffectRequest) ProtoReflect ¶
func (x *EffectRequest) ProtoReflect() protoreflect.Message
func (*EffectRequest) Reset ¶
func (x *EffectRequest) Reset()
func (*EffectRequest) String ¶
func (x *EffectRequest) String() string
type EmitEventRequest ¶
type EmitEventRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are assignable to Event: // *EmitEventRequest_EventOne // *EmitEventRequest_EventTwo Event isEmitEventRequest_Event `protobuf_oneof:"event"` // contains filtered or unexported fields }
An `EmitEventRequest` is received by the `EventSourcedEntityOne` entity to instruct it to emit either an `EventOne` or an `EventTwo`.
func (*EmitEventRequest) Descriptor
deprecated
func (*EmitEventRequest) Descriptor() ([]byte, []int)
Deprecated: Use EmitEventRequest.ProtoReflect.Descriptor instead.
func (*EmitEventRequest) GetEvent ¶
func (m *EmitEventRequest) GetEvent() isEmitEventRequest_Event
func (*EmitEventRequest) GetEventOne ¶
func (x *EmitEventRequest) GetEventOne() *EventOne
func (*EmitEventRequest) GetEventTwo ¶
func (x *EmitEventRequest) GetEventTwo() *EventTwo
func (*EmitEventRequest) GetId ¶
func (x *EmitEventRequest) GetId() string
func (*EmitEventRequest) ProtoMessage ¶
func (*EmitEventRequest) ProtoMessage()
func (*EmitEventRequest) ProtoReflect ¶
func (x *EmitEventRequest) ProtoReflect() protoreflect.Message
func (*EmitEventRequest) Reset ¶
func (x *EmitEventRequest) Reset()
func (*EmitEventRequest) String ¶
func (x *EmitEventRequest) String() string
type EmitEventRequest_EventOne ¶
type EmitEventRequest_EventOne struct {
EventOne *EventOne `protobuf:"bytes,2,opt,name=event_one,json=eventOne,proto3,oneof"`
}
type EmitEventRequest_EventTwo ¶
type EmitEventRequest_EventTwo struct {
EventTwo *EventTwo `protobuf:"bytes,3,opt,name=event_two,json=eventTwo,proto3,oneof"`
}
type EventLogSubscriberModel ¶
type EventLogSubscriberModel struct { }
func (*EventLogSubscriberModel) HandleCommand ¶
type EventLogSubscriberModelClient ¶
type EventLogSubscriberModelClient interface { ProcessEventOne(ctx context.Context, in *EventOne, opts ...grpc.CallOption) (*Response, error) ProcessEventTwo(ctx context.Context, in *EventTwo, opts ...grpc.CallOption) (EventLogSubscriberModel_ProcessEventTwoClient, error) Effect(ctx context.Context, in *EffectRequest, opts ...grpc.CallOption) (*Response, error) ProcessAnyEvent(ctx context.Context, in *any.Any, opts ...grpc.CallOption) (*Response, error) }
EventLogSubscriberModelClient is the client API for EventLogSubscriberModel service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEventLogSubscriberModelClient ¶
func NewEventLogSubscriberModelClient(cc grpc.ClientConnInterface) EventLogSubscriberModelClient
type EventLogSubscriberModelServer ¶
type EventLogSubscriberModelServer interface { ProcessEventOne(context.Context, *EventOne) (*Response, error) ProcessEventTwo(*EventTwo, EventLogSubscriberModel_ProcessEventTwoServer) error Effect(context.Context, *EffectRequest) (*Response, error) ProcessAnyEvent(context.Context, *any.Any) (*Response, error) // contains filtered or unexported methods }
EventLogSubscriberModelServer is the server API for EventLogSubscriberModel service. All implementations must embed UnimplementedEventLogSubscriberModelServer for forward compatibility
type EventLogSubscriberModel_ProcessEventTwoClient ¶
type EventLogSubscriberModel_ProcessEventTwoClient interface { Recv() (*Response, error) grpc.ClientStream }
type EventLogSubscriberModel_ProcessEventTwoServer ¶
type EventLogSubscriberModel_ProcessEventTwoServer interface { Send(*Response) error grpc.ServerStream }
type EventOne ¶
type EventOne struct { Step *ProcessStep `protobuf:"bytes,2,opt,name=step,proto3" json:"step,omitempty"` // contains filtered or unexported fields }
An `EventOne` is an event emitted by the `EventSourcedEntityOne` entity and subscribed to by `EventLogSubscriberModel`.
func (*EventOne) Descriptor
deprecated
func (*EventOne) GetStep ¶
func (x *EventOne) GetStep() *ProcessStep
func (*EventOne) ProtoMessage ¶
func (*EventOne) ProtoMessage()
func (*EventOne) ProtoReflect ¶
func (x *EventOne) ProtoReflect() protoreflect.Message
type EventSourcedEntityOne ¶
type EventSourcedEntityOne struct{}
func (EventSourcedEntityOne) HandleCommand ¶
func (EventSourcedEntityOne) HandleCommand(ctx *eventsourced.Context, name string, cmd proto.Message) (reply proto.Message, err error)
func (EventSourcedEntityOne) HandleEvent ¶
func (EventSourcedEntityOne) HandleEvent(ctx *eventsourced.Context, event interface{}) error
type EventSourcedEntityOneClient ¶
type EventSourcedEntityOneClient interface {
EmitEvent(ctx context.Context, in *EmitEventRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
EventSourcedEntityOneClient is the client API for EventSourcedEntityOne service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEventSourcedEntityOneClient ¶
func NewEventSourcedEntityOneClient(cc grpc.ClientConnInterface) EventSourcedEntityOneClient
type EventSourcedEntityOneServer ¶
type EventSourcedEntityOneServer interface { EmitEvent(context.Context, *EmitEventRequest) (*empty.Empty, error) // contains filtered or unexported methods }
EventSourcedEntityOneServer is the server API for EventSourcedEntityOne service. All implementations must embed UnimplementedEventSourcedEntityOneServer for forward compatibility
type EventSourcedEntityTwo ¶
type EventSourcedEntityTwo struct{}
func (EventSourcedEntityTwo) HandleCommand ¶
func (EventSourcedEntityTwo) HandleCommand(ctx *eventsourced.Context, name string, cmd proto.Message) (reply proto.Message, err error)
func (EventSourcedEntityTwo) HandleEvent ¶
func (EventSourcedEntityTwo) HandleEvent(ctx *eventsourced.Context, event interface{}) error
type EventSourcedEntityTwoClient ¶
type EventSourcedEntityTwoClient interface {
EmitJsonEvent(ctx context.Context, in *JsonEvent, opts ...grpc.CallOption) (*empty.Empty, error)
}
EventSourcedEntityTwoClient is the client API for EventSourcedEntityTwo service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewEventSourcedEntityTwoClient ¶
func NewEventSourcedEntityTwoClient(cc grpc.ClientConnInterface) EventSourcedEntityTwoClient
type EventSourcedEntityTwoServer ¶
type EventSourcedEntityTwoServer interface { EmitJsonEvent(context.Context, *JsonEvent) (*empty.Empty, error) // contains filtered or unexported methods }
EventSourcedEntityTwoServer is the server API for EventSourcedEntityTwo service. All implementations must embed UnimplementedEventSourcedEntityTwoServer for forward compatibility
type EventTwo ¶
type EventTwo struct { Step []*ProcessStep `protobuf:"bytes,2,rep,name=step,proto3" json:"step,omitempty"` // contains filtered or unexported fields }
An `EventTwo` is an event emitted by the `EventSourcedEntityOne` entity and subscribed to by `EventLogSubscriberModel`.
func (*EventTwo) Descriptor
deprecated
func (*EventTwo) GetStep ¶
func (x *EventTwo) GetStep() []*ProcessStep
func (*EventTwo) ProtoMessage ¶
func (*EventTwo) ProtoMessage()
func (*EventTwo) ProtoReflect ¶
func (x *EventTwo) ProtoReflect() protoreflect.Message
type Forward ¶
type Forward struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Replace the response with a forward to `cloudstate.tck.model.eventlogeventing.EventLogSubscriberModel/Effect`. The payload must be an `EffectRequest` message with the given `message`.
func (*Forward) Descriptor
deprecated
func (*Forward) GetMessage ¶
func (*Forward) ProtoMessage ¶
func (*Forward) ProtoMessage()
func (*Forward) ProtoReflect ¶
func (x *Forward) ProtoReflect() protoreflect.Message
type JsonEvent ¶
type JsonEvent struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
A `JsonEvent` is an event emitted by the `EventSourcedEntityTwo` entity and subscribed to by `EventLogSubscriberModel`.
func (*JsonEvent) Descriptor
deprecated
func (*JsonEvent) GetMessage ¶
func (*JsonEvent) ProtoMessage ¶
func (*JsonEvent) ProtoMessage()
func (*JsonEvent) ProtoReflect ¶
func (x *JsonEvent) ProtoReflect() protoreflect.Message
type JsonMessage ¶
type JsonMessage struct {
Message string `json:"message"`
}
type ProcessStep ¶
type ProcessStep struct { // Types that are assignable to Step: // *ProcessStep_Reply // *ProcessStep_Forward Step isProcessStep_Step `protobuf_oneof:"step"` // contains filtered or unexported fields }
Each `ProcessStep` is one of:
- Reply: reply with the given message in a `Response`. - Forward: forward to another service, in place of replying with a `Response`.
func (*ProcessStep) Descriptor
deprecated
func (*ProcessStep) Descriptor() ([]byte, []int)
Deprecated: Use ProcessStep.ProtoReflect.Descriptor instead.
func (*ProcessStep) GetForward ¶
func (x *ProcessStep) GetForward() *Forward
func (*ProcessStep) GetReply ¶
func (x *ProcessStep) GetReply() *Reply
func (*ProcessStep) GetStep ¶
func (m *ProcessStep) GetStep() isProcessStep_Step
func (*ProcessStep) ProtoMessage ¶
func (*ProcessStep) ProtoMessage()
func (*ProcessStep) ProtoReflect ¶
func (x *ProcessStep) ProtoReflect() protoreflect.Message
func (*ProcessStep) Reset ¶
func (x *ProcessStep) Reset()
func (*ProcessStep) String ¶
func (x *ProcessStep) String() string
type ProcessStep_Forward ¶
type ProcessStep_Forward struct {
Forward *Forward `protobuf:"bytes,2,opt,name=forward,proto3,oneof"`
}
type ProcessStep_Reply ¶
type ProcessStep_Reply struct {
Reply *Reply `protobuf:"bytes,1,opt,name=reply,proto3,oneof"`
}
type Reply ¶
type Reply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Reply with a message in the response.
func (*Reply) Descriptor
deprecated
func (*Reply) GetMessage ¶
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) ProtoReflect ¶
func (x *Reply) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The `Response` message must contain the message from the corresponding reply step.
func (*Response) Descriptor
deprecated
func (*Response) GetMessage ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedEventLogSubscriberModelServer ¶
type UnimplementedEventLogSubscriberModelServer struct { }
UnimplementedEventLogSubscriberModelServer must be embedded to have forward compatible implementations.
func (UnimplementedEventLogSubscriberModelServer) Effect ¶
func (UnimplementedEventLogSubscriberModelServer) Effect(context.Context, *EffectRequest) (*Response, error)
func (UnimplementedEventLogSubscriberModelServer) ProcessAnyEvent ¶
func (UnimplementedEventLogSubscriberModelServer) ProcessEventOne ¶
func (UnimplementedEventLogSubscriberModelServer) ProcessEventTwo ¶
func (UnimplementedEventLogSubscriberModelServer) ProcessEventTwo(*EventTwo, EventLogSubscriberModel_ProcessEventTwoServer) error
type UnimplementedEventSourcedEntityOneServer ¶
type UnimplementedEventSourcedEntityOneServer struct { }
UnimplementedEventSourcedEntityOneServer must be embedded to have forward compatible implementations.
func (UnimplementedEventSourcedEntityOneServer) EmitEvent ¶
func (UnimplementedEventSourcedEntityOneServer) EmitEvent(context.Context, *EmitEventRequest) (*empty.Empty, error)
type UnimplementedEventSourcedEntityTwoServer ¶
type UnimplementedEventSourcedEntityTwoServer struct { }
UnimplementedEventSourcedEntityTwoServer must be embedded to have forward compatible implementations.
func (UnimplementedEventSourcedEntityTwoServer) EmitJsonEvent ¶
type UnsafeEventLogSubscriberModelServer ¶
type UnsafeEventLogSubscriberModelServer interface {
// contains filtered or unexported methods
}
UnsafeEventLogSubscriberModelServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventLogSubscriberModelServer will result in compilation errors.
type UnsafeEventSourcedEntityOneServer ¶
type UnsafeEventSourcedEntityOneServer interface {
// contains filtered or unexported methods
}
UnsafeEventSourcedEntityOneServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventSourcedEntityOneServer will result in compilation errors.
type UnsafeEventSourcedEntityTwoServer ¶
type UnsafeEventSourcedEntityTwoServer interface {
// contains filtered or unexported methods
}
UnsafeEventSourcedEntityTwoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventSourcedEntityTwoServer will result in compilation errors.