eventlogeventing

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func (e *EventLogSubscriberModel) HandleCommand(ctx *action.Context, name string, msg proto.Message) error

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use EventOne.ProtoReflect.Descriptor instead.

func (*EventOne) GetStep

func (x *EventOne) GetStep() *ProcessStep

func (*EventOne) ProtoMessage

func (*EventOne) ProtoMessage()

func (*EventOne) ProtoReflect

func (x *EventOne) ProtoReflect() protoreflect.Message

func (*EventOne) Reset

func (x *EventOne) Reset()

func (*EventOne) String

func (x *EventOne) String() string

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.

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use EventTwo.ProtoReflect.Descriptor instead.

func (*EventTwo) GetStep

func (x *EventTwo) GetStep() []*ProcessStep

func (*EventTwo) ProtoMessage

func (*EventTwo) ProtoMessage()

func (*EventTwo) ProtoReflect

func (x *EventTwo) ProtoReflect() protoreflect.Message

func (*EventTwo) Reset

func (x *EventTwo) Reset()

func (*EventTwo) String

func (x *EventTwo) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Forward.ProtoReflect.Descriptor instead.

func (*Forward) GetMessage

func (x *Forward) GetMessage() string

func (*Forward) ProtoMessage

func (*Forward) ProtoMessage()

func (*Forward) ProtoReflect

func (x *Forward) ProtoReflect() protoreflect.Message

func (*Forward) Reset

func (x *Forward) Reset()

func (*Forward) String

func (x *Forward) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use JsonEvent.ProtoReflect.Descriptor instead.

func (*JsonEvent) GetId

func (x *JsonEvent) GetId() string

func (*JsonEvent) GetMessage

func (x *JsonEvent) GetMessage() string

func (*JsonEvent) ProtoMessage

func (*JsonEvent) ProtoMessage()

func (*JsonEvent) ProtoReflect

func (x *JsonEvent) ProtoReflect() protoreflect.Message

func (*JsonEvent) Reset

func (x *JsonEvent) Reset()

func (*JsonEvent) String

func (x *JsonEvent) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetMessage

func (x *Reply) GetMessage() string

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect

func (x *Reply) ProtoReflect() protoreflect.Message

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetId

func (x *Response) GetId() string

func (*Response) GetMessage

func (x *Response) GetMessage() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type UnimplementedEventLogSubscriberModelServer

type UnimplementedEventLogSubscriberModelServer struct {
}

UnimplementedEventLogSubscriberModelServer must be embedded to have forward compatible implementations.

func (UnimplementedEventLogSubscriberModelServer) Effect

func (UnimplementedEventLogSubscriberModelServer) ProcessAnyEvent

func (UnimplementedEventLogSubscriberModelServer) ProcessEventOne

func (UnimplementedEventLogSubscriberModelServer) ProcessEventTwo

type UnimplementedEventSourcedEntityOneServer

type UnimplementedEventSourcedEntityOneServer struct {
}

UnimplementedEventSourcedEntityOneServer must be embedded to have forward compatible implementations.

func (UnimplementedEventSourcedEntityOneServer) EmitEvent

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL