valueentity

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tck_valueentity_proto protoreflect.FileDescriptor

Functions

func NewValueEntityConfiguredEntity

func NewValueEntityConfiguredEntity(id value.EntityID) value.EntityHandler

func NewValueEntityTckModelEntity

func NewValueEntityTckModelEntity(id value.EntityID) value.EntityHandler

func NewValueEntityTckModelEntityTwo

func NewValueEntityTckModelEntityTwo(id value.EntityID) value.EntityHandler

func RegisterValueEntityConfiguredServer

func RegisterValueEntityConfiguredServer(s grpc.ServiceRegistrar, srv ValueEntityConfiguredServer)

func RegisterValueEntityTckModelServer

func RegisterValueEntityTckModelServer(s grpc.ServiceRegistrar, srv ValueEntityTckModelServer)

func RegisterValueEntityTwoServer

func RegisterValueEntityTwoServer(s grpc.ServiceRegistrar, srv ValueEntityTwoServer)

Types

type Delete

type Delete struct {
	// contains filtered or unexported fields
}

Delete an the state with a `Persisted` message.

func (*Delete) Descriptor deprecated

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

Deprecated: Use Delete.ProtoReflect.Descriptor instead.

func (*Delete) ProtoMessage

func (*Delete) ProtoMessage()

func (*Delete) ProtoReflect

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

func (*Delete) Reset

func (x *Delete) Reset()

func (*Delete) String

func (x *Delete) String() string

type Effect

type Effect 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.valueentity.ValueEntityTwo/Call`. The payload must be a `Request` message with the given `id`. The side effect should be marked synchronous based on the given `synchronous` value.

func (*Effect) Descriptor deprecated

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

Deprecated: Use Effect.ProtoReflect.Descriptor instead.

func (*Effect) GetId

func (x *Effect) GetId() string

func (*Effect) GetSynchronous

func (x *Effect) GetSynchronous() bool

func (*Effect) ProtoMessage

func (*Effect) ProtoMessage()

func (*Effect) ProtoReflect

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

func (*Effect) Reset

func (x *Effect) Reset()

func (*Effect) String

func (x *Effect) String() string

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.valueentity.ValueEntityTwo/Call`. The payload must be a `Request` 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 Persisted

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

The `Persisted` message wraps both state value.

func (*Persisted) Descriptor deprecated

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

Deprecated: Use Persisted.ProtoReflect.Descriptor instead.

func (*Persisted) GetValue

func (x *Persisted) GetValue() string

func (*Persisted) ProtoMessage

func (*Persisted) ProtoMessage()

func (*Persisted) ProtoReflect

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

func (*Persisted) Reset

func (x *Persisted) Reset()

func (*Persisted) String

func (x *Persisted) String() string

type Request

type Request struct {
	Id      string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Actions []*RequestAction `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"`
	// contains filtered or unexported fields
}

A `Request` message contains any actions that the entity should process. Actions must be processed in order. Any actions after a `Fail` may be ignored.

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetActions

func (x *Request) GetActions() []*RequestAction

func (*Request) GetId

func (x *Request) GetId() string

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 RequestAction

type RequestAction struct {

	// Types that are assignable to Action:
	//	*RequestAction_Update
	//	*RequestAction_Delete
	//	*RequestAction_Forward
	//	*RequestAction_Effect
	//	*RequestAction_Fail
	Action isRequestAction_Action `protobuf_oneof:"action"`
	// contains filtered or unexported fields
}

Each `RequestAction` is one of:

- Update: update the state, with a given value. - Delete: delete the state. - Forward: forward to another service, in place of replying with a Response. - Effect: add a side effect to another service to the reply. - Fail: fail the current `Process` command.

func (*RequestAction) Descriptor deprecated

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

Deprecated: Use RequestAction.ProtoReflect.Descriptor instead.

func (*RequestAction) GetAction

func (m *RequestAction) GetAction() isRequestAction_Action

func (*RequestAction) GetDelete

func (x *RequestAction) GetDelete() *Delete

func (*RequestAction) GetEffect

func (x *RequestAction) GetEffect() *Effect

func (*RequestAction) GetFail

func (x *RequestAction) GetFail() *Fail

func (*RequestAction) GetForward

func (x *RequestAction) GetForward() *Forward

func (*RequestAction) GetUpdate

func (x *RequestAction) GetUpdate() *Update

func (*RequestAction) ProtoMessage

func (*RequestAction) ProtoMessage()

func (*RequestAction) ProtoReflect

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

func (*RequestAction) Reset

func (x *RequestAction) Reset()

func (*RequestAction) String

func (x *RequestAction) String() string

type RequestAction_Delete

type RequestAction_Delete struct {
	Delete *Delete `protobuf:"bytes,2,opt,name=delete,proto3,oneof"`
}

type RequestAction_Effect

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

type RequestAction_Fail

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

type RequestAction_Forward

type RequestAction_Forward struct {
	Forward *Forward `protobuf:"bytes,3,opt,name=forward,proto3,oneof"`
}

type RequestAction_Update

type RequestAction_Update struct {
	Update *Update `protobuf:"bytes,1,opt,name=update,proto3,oneof"`
}

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 for the `Process` must contain the current state (after processing actions).

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 UnimplementedValueEntityConfiguredServer

type UnimplementedValueEntityConfiguredServer struct {
}

UnimplementedValueEntityConfiguredServer must be embedded to have forward compatible implementations.

func (UnimplementedValueEntityConfiguredServer) Call

type UnimplementedValueEntityTckModelServer

type UnimplementedValueEntityTckModelServer struct {
}

UnimplementedValueEntityTckModelServer must be embedded to have forward compatible implementations.

func (UnimplementedValueEntityTckModelServer) Process

type UnimplementedValueEntityTwoServer

type UnimplementedValueEntityTwoServer struct {
}

UnimplementedValueEntityTwoServer must be embedded to have forward compatible implementations.

func (UnimplementedValueEntityTwoServer) Call

type UnsafeValueEntityConfiguredServer

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

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

type UnsafeValueEntityTckModelServer

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

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

type UnsafeValueEntityTwoServer

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

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

type Update

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

Update the state, with the state value in a `Persisted` message.

func (*Update) Descriptor deprecated

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

Deprecated: Use Update.ProtoReflect.Descriptor instead.

func (*Update) GetValue

func (x *Update) GetValue() string

func (*Update) ProtoMessage

func (*Update) ProtoMessage()

func (*Update) ProtoReflect

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

func (*Update) Reset

func (x *Update) Reset()

func (*Update) String

func (x *Update) String() string

type ValueEntityConfiguredClient

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

ValueEntityConfiguredClient is the client API for ValueEntityConfigured 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 ValueEntityConfiguredEntity

type ValueEntityConfiguredEntity string

func (*ValueEntityConfiguredEntity) HandleCommand

func (v *ValueEntityConfiguredEntity) HandleCommand(ctx *value.Context, name string, msg proto.Message) (*any.Any, error)

func (*ValueEntityConfiguredEntity) HandleState

func (v *ValueEntityConfiguredEntity) HandleState(ctx *value.Context, state *any.Any) error

type ValueEntityConfiguredServer

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

ValueEntityConfiguredServer is the server API for ValueEntityConfigured service. All implementations must embed UnimplementedValueEntityConfiguredServer for forward compatibility

type ValueEntityTckModelClient

type ValueEntityTckModelClient interface {
	Process(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

ValueEntityTckModelClient is the client API for ValueEntityTckModel 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 ValueEntityTckModelEntity

type ValueEntityTckModelEntity struct {
	// contains filtered or unexported fields
}

func (*ValueEntityTckModelEntity) HandleCommand

func (e *ValueEntityTckModelEntity) HandleCommand(ctx *value.Context, name string, msg proto.Message) (*any.Any, error)

func (*ValueEntityTckModelEntity) HandleState

func (e *ValueEntityTckModelEntity) HandleState(ctx *value.Context, state *any.Any) error

type ValueEntityTckModelEntityTwo

type ValueEntityTckModelEntityTwo struct {
}

func (*ValueEntityTckModelEntityTwo) HandleCommand

func (e *ValueEntityTckModelEntityTwo) HandleCommand(ctx *value.Context, name string, msg proto.Message) (*any.Any, error)

func (*ValueEntityTckModelEntityTwo) HandleState

func (e *ValueEntityTckModelEntityTwo) HandleState(ctx *value.Context, state *any.Any) error

type ValueEntityTckModelServer

type ValueEntityTckModelServer interface {
	Process(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

ValueEntityTckModelServer is the server API for ValueEntityTckModel service. All implementations must embed UnimplementedValueEntityTckModelServer for forward compatibility

type ValueEntityTwoClient

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

ValueEntityTwoClient is the client API for ValueEntityTwo 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 ValueEntityTwoServer

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

ValueEntityTwoServer is the server API for ValueEntityTwo service. All implementations must embed UnimplementedValueEntityTwoServer for forward compatibility

Jump to

Keyboard shortcuts

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