action

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: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tck_action_proto protoreflect.FileDescriptor

Functions

func NewTestModel

func NewTestModel() action.EntityHandler

func NewTestModelTwo

func NewTestModelTwo() action.EntityHandler

func RegisterActionTckModelServer

func RegisterActionTckModelServer(s grpc.ServiceRegistrar, srv ActionTckModelServer)

func RegisterActionTwoServer

func RegisterActionTwoServer(s grpc.ServiceRegistrar, srv ActionTwoServer)

Types

type ActionTckModelClient

type ActionTckModelClient interface {
	ProcessUnary(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	ProcessStreamedIn(ctx context.Context, opts ...grpc.CallOption) (ActionTckModel_ProcessStreamedInClient, error)
	ProcessStreamedOut(ctx context.Context, in *Request, opts ...grpc.CallOption) (ActionTckModel_ProcessStreamedOutClient, error)
	ProcessStreamed(ctx context.Context, opts ...grpc.CallOption) (ActionTckModel_ProcessStreamedClient, error)
}

ActionTckModelClient is the client API for ActionTckModel 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 ActionTckModelServer

type ActionTckModelServer interface {
	ProcessUnary(context.Context, *Request) (*Response, error)
	ProcessStreamedIn(ActionTckModel_ProcessStreamedInServer) error
	ProcessStreamedOut(*Request, ActionTckModel_ProcessStreamedOutServer) error
	ProcessStreamed(ActionTckModel_ProcessStreamedServer) error
	// contains filtered or unexported methods
}

ActionTckModelServer is the server API for ActionTckModel service. All implementations must embed UnimplementedActionTckModelServer for forward compatibility

type ActionTckModel_ProcessStreamedClient

type ActionTckModel_ProcessStreamedClient interface {
	Send(*Request) error
	Recv() (*Response, error)
	grpc.ClientStream
}

type ActionTckModel_ProcessStreamedInClient

type ActionTckModel_ProcessStreamedInClient interface {
	Send(*Request) error
	CloseAndRecv() (*Response, error)
	grpc.ClientStream
}

type ActionTckModel_ProcessStreamedInServer

type ActionTckModel_ProcessStreamedInServer interface {
	SendAndClose(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

type ActionTckModel_ProcessStreamedOutClient

type ActionTckModel_ProcessStreamedOutClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type ActionTckModel_ProcessStreamedOutServer

type ActionTckModel_ProcessStreamedOutServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type ActionTckModel_ProcessStreamedServer

type ActionTckModel_ProcessStreamedServer interface {
	Send(*Response) error
	Recv() (*Request, error)
	grpc.ServerStream
}

type ActionTwoClient

type ActionTwoClient interface {
	Call(ctx context.Context, in *OtherRequest, opts ...grpc.CallOption) (*Response, error)
}

ActionTwoClient is the client API for ActionTwo 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 NewActionTwoClient

func NewActionTwoClient(cc grpc.ClientConnInterface) ActionTwoClient

type ActionTwoServer

type ActionTwoServer interface {
	Call(context.Context, *OtherRequest) (*Response, error)
	// contains filtered or unexported methods
}

ActionTwoServer is the server API for ActionTwo service. All implementations must embed UnimplementedActionTwoServer for forward compatibility

type Fail

type Fail struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Fail the current command with the given description `message`.

func (*Fail) Descriptor deprecated

func (*Fail) Descriptor() ([]byte, []int)

Deprecated: Use Fail.ProtoReflect.Descriptor instead.

func (*Fail) GetMessage

func (x *Fail) GetMessage() string

func (*Fail) ProtoMessage

func (*Fail) ProtoMessage()

func (*Fail) ProtoReflect

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

func (*Fail) Reset

func (x *Fail) Reset()

func (*Fail) String

func (x *Fail) String() string

type Forward

type Forward struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Replace the response with a forward to `cloudstate.tck.model.ActionTwo/Call`. The payload must be an `OtherRequest` message with the given `id`.

func (*Forward) Descriptor deprecated

func (*Forward) Descriptor() ([]byte, []int)

Deprecated: Use Forward.ProtoReflect.Descriptor instead.

func (*Forward) GetId

func (x *Forward) GetId() 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 OtherRequest

type OtherRequest struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

The `OtherRequest` message must contain the id for the forward or side effect.

func (*OtherRequest) Descriptor deprecated

func (*OtherRequest) Descriptor() ([]byte, []int)

Deprecated: Use OtherRequest.ProtoReflect.Descriptor instead.

func (*OtherRequest) GetId

func (x *OtherRequest) GetId() string

func (*OtherRequest) ProtoMessage

func (*OtherRequest) ProtoMessage()

func (*OtherRequest) ProtoReflect

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

func (*OtherRequest) Reset

func (x *OtherRequest) Reset()

func (*OtherRequest) String

func (x *OtherRequest) String() string

type ProcessGroup

type ProcessGroup struct {
	Steps []*ProcessStep `protobuf:"bytes,1,rep,name=steps,proto3" json:"steps,omitempty"`
	// contains filtered or unexported fields
}

A `ProcessGroup` contains the steps for one response.

func (*ProcessGroup) Descriptor deprecated

func (*ProcessGroup) Descriptor() ([]byte, []int)

Deprecated: Use ProcessGroup.ProtoReflect.Descriptor instead.

func (*ProcessGroup) GetSteps

func (x *ProcessGroup) GetSteps() []*ProcessStep

func (*ProcessGroup) ProtoMessage

func (*ProcessGroup) ProtoMessage()

func (*ProcessGroup) ProtoReflect

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

func (*ProcessGroup) Reset

func (x *ProcessGroup) Reset()

func (*ProcessGroup) String

func (x *ProcessGroup) String() string

type ProcessStep

type ProcessStep struct {

	// Types that are assignable to Step:
	//	*ProcessStep_Reply
	//	*ProcessStep_Forward
	//	*ProcessStep_Fail
	//	*ProcessStep_Effect
	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`. - Fail: fail the current `Process` command by sending a failure. - SideEffect: add a side effect to the current reply, forward, or failure.

func (*ProcessStep) Descriptor deprecated

func (*ProcessStep) Descriptor() ([]byte, []int)

Deprecated: Use ProcessStep.ProtoReflect.Descriptor instead.

func (*ProcessStep) GetEffect

func (x *ProcessStep) GetEffect() *SideEffect

func (*ProcessStep) GetFail

func (x *ProcessStep) GetFail() *Fail

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_Effect

type ProcessStep_Effect struct {
	Effect *SideEffect `protobuf:"bytes,4,opt,name=effect,proto3,oneof"`
}

type ProcessStep_Fail

type ProcessStep_Fail struct {
	Fail *Fail `protobuf:"bytes,3,opt,name=fail,proto3,oneof"`
}

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 reponse.

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 Request

type Request struct {
	Groups []*ProcessGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"`
	// contains filtered or unexported fields
}

A `Request` message contains the steps that the entity should process. Steps are grouped for streamed responses. Steps must be processed in order.

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetGroups

func (x *Request) GetGroups() []*ProcessGroup

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Message string `protobuf:"bytes,1,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) 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 SideEffect

type SideEffect struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Synchronous bool   `protobuf:"varint,2,opt,name=synchronous,proto3" json:"synchronous,omitempty"`
	// contains filtered or unexported fields
}

Add a side effect to the reply, to `cloudstate.tck.model.ActionTwo/Call`. The payload must be an `OtherRequest` message with the given `id`. The side effect should be marked synchronous based on the given `synchronous` value.

func (*SideEffect) Descriptor deprecated

func (*SideEffect) Descriptor() ([]byte, []int)

Deprecated: Use SideEffect.ProtoReflect.Descriptor instead.

func (*SideEffect) GetId

func (x *SideEffect) GetId() string

func (*SideEffect) GetSynchronous

func (x *SideEffect) GetSynchronous() bool

func (*SideEffect) ProtoMessage

func (*SideEffect) ProtoMessage()

func (*SideEffect) ProtoReflect

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

func (*SideEffect) Reset

func (x *SideEffect) Reset()

func (*SideEffect) String

func (x *SideEffect) String() string

type TestModel

type TestModel struct {
}

func (*TestModel) HandleCommand

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

type TestModelTwo

type TestModelTwo struct {
}

func (*TestModelTwo) HandleCommand

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

type UnimplementedActionTckModelServer

type UnimplementedActionTckModelServer struct {
}

UnimplementedActionTckModelServer must be embedded to have forward compatible implementations.

func (UnimplementedActionTckModelServer) ProcessStreamed

func (UnimplementedActionTckModelServer) ProcessStreamedIn

func (UnimplementedActionTckModelServer) ProcessStreamedOut

func (UnimplementedActionTckModelServer) ProcessUnary

type UnimplementedActionTwoServer

type UnimplementedActionTwoServer struct {
}

UnimplementedActionTwoServer must be embedded to have forward compatible implementations.

func (UnimplementedActionTwoServer) Call

type UnsafeActionTckModelServer

type UnsafeActionTckModelServer interface {
	// contains filtered or unexported methods
}

UnsafeActionTckModelServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ActionTckModelServer will result in compilation errors.

type UnsafeActionTwoServer

type UnsafeActionTwoServer interface {
	// contains filtered or unexported methods
}

UnsafeActionTwoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ActionTwoServer will result in compilation errors.

Jump to

Keyboard shortcuts

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