protocol

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: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EventSourced = "cloudstate.eventsourced.EventSourced"
	CRDT         = "cloudstate.crdt.Crdt"
	Action       = "cloudstate.action.ActionProtocol"
	Value        = "cloudstate.valueentity.ValueEntity"
)

Variables

View Source
var File_entity_proto protoreflect.FileDescriptor

Functions

func RegisterEntityDiscoveryServer

func RegisterEntityDiscoveryServer(s grpc.ServiceRegistrar, srv EntityDiscoveryServer)

Types

type ClientAction

type ClientAction struct {

	// Types that are assignable to Action:
	//	*ClientAction_Reply
	//	*ClientAction_Forward
	//	*ClientAction_Failure
	Action isClientAction_Action `protobuf_oneof:"action"`
	// contains filtered or unexported fields
}

An action for the client

func (*ClientAction) Descriptor deprecated

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

Deprecated: Use ClientAction.ProtoReflect.Descriptor instead.

func (*ClientAction) GetAction

func (m *ClientAction) GetAction() isClientAction_Action

func (*ClientAction) GetFailure

func (x *ClientAction) GetFailure() *Failure

func (*ClientAction) GetForward

func (x *ClientAction) GetForward() *Forward

func (*ClientAction) GetReply

func (x *ClientAction) GetReply() *Reply

func (*ClientAction) ProtoMessage

func (*ClientAction) ProtoMessage()

func (*ClientAction) ProtoReflect added in v0.2.0

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

func (*ClientAction) Reset

func (x *ClientAction) Reset()

func (*ClientAction) String

func (x *ClientAction) String() string

type ClientAction_Failure

type ClientAction_Failure struct {
	// Send a failure to the client
	Failure *Failure `protobuf:"bytes,3,opt,name=failure,proto3,oneof"`
}

type ClientAction_Forward

type ClientAction_Forward struct {
	// Forward to another entity
	Forward *Forward `protobuf:"bytes,2,opt,name=forward,proto3,oneof"`
}

type ClientAction_Reply

type ClientAction_Reply struct {
	// Send a reply
	Reply *Reply `protobuf:"bytes,1,opt,name=reply,proto3,oneof"`
}

type ClientError added in v0.2.0

type ClientError struct {
	Err error
}

func (ClientError) Error added in v0.2.0

func (e ClientError) Error() string

func (ClientError) Is added in v0.2.0

func (e ClientError) Is(err error) bool

func (ClientError) Unwrap added in v0.2.0

func (e ClientError) Unwrap() error

type Command

type Command struct {

	// The ID of the entity.
	EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
	// A command id.
	Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// Command name
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// The command payload.
	Payload *any.Any `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	// Whether the command is streamed or not.
	Streamed bool `protobuf:"varint,5,opt,name=streamed,proto3" json:"streamed,omitempty"`
	// The command metadata.
	//
	// Not all transports support per message metadata, for example, gRPC doesn't. The Cloudstate proxy MAY include
	// metadata from other locations in this case, for example, in gRPC, a unary call MAY have the HTTP request headers
	// attached to the command, while a streamed call MAY have the HTTP request headers attached as the metadata for
	// either the first command, or every command. This specification leaves this behavior undefined.
	Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

A command. For each command received, a reply must be sent with a matching command id.

func (*Command) Descriptor deprecated

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

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetEntityId

func (x *Command) GetEntityId() string

func (*Command) GetId

func (x *Command) GetId() int64

func (*Command) GetMetadata added in v0.2.0

func (x *Command) GetMetadata() *Metadata

func (*Command) GetName

func (x *Command) GetName() string

func (*Command) GetPayload

func (x *Command) GetPayload() *any.Any

func (*Command) GetStreamed

func (x *Command) GetStreamed() bool

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect added in v0.2.0

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

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type Config added in v0.2.0

type Config struct {
	ServiceName    string
	ServiceVersion string
}

Config go get a CloudState instance configured.

type DescriptorConfig added in v0.2.0

type DescriptorConfig struct {
	Service        string
	Domain         []string
	DomainMessages []descriptor.Message
}

DescriptorConfig configures service and dependent descriptors.

func (DescriptorConfig) AddDomainDescriptor added in v0.2.0

func (dc DescriptorConfig) AddDomainDescriptor(filename ...string) DescriptorConfig

func (DescriptorConfig) AddDomainMessage added in v0.2.0

func (dc DescriptorConfig) AddDomainMessage(m descriptor.Message) DescriptorConfig

type Entity

type Entity struct {

	// The type of entity. By convention, this should be a fully qualified entity protocol grpc
	// service name, for example, cloudstate.eventsourced.EventSourced.
	EntityType string `protobuf:"bytes,1,opt,name=entity_type,json=entityType,proto3" json:"entity_type,omitempty"`
	// The name of the service to load from the protobuf file.
	ServiceName string `protobuf:"bytes,2,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// The ID to namespace state by. How this is used depends on the type of entity, for example,
	// event sourced entities will prefix this to the persistence id.
	PersistenceId string `protobuf:"bytes,3,opt,name=persistence_id,json=persistenceId,proto3" json:"persistence_id,omitempty"`
	// The passivation strategy for the entity.
	PassivationStrategy *EntityPassivationStrategy `protobuf:"bytes,4,opt,name=passivation_strategy,json=passivationStrategy,proto3" json:"passivation_strategy,omitempty"`
	// contains filtered or unexported fields
}

func (*Entity) Descriptor deprecated

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

Deprecated: Use Entity.ProtoReflect.Descriptor instead.

func (*Entity) GetEntityType

func (x *Entity) GetEntityType() string

func (*Entity) GetPassivationStrategy added in v0.3.0

func (x *Entity) GetPassivationStrategy() *EntityPassivationStrategy

func (*Entity) GetPersistenceId

func (x *Entity) GetPersistenceId() string

func (*Entity) GetServiceName

func (x *Entity) GetServiceName() string

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) ProtoReflect added in v0.2.0

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

func (*Entity) Reset

func (x *Entity) Reset()

func (*Entity) String

func (x *Entity) String() string

type EntityDiscoveryClient

type EntityDiscoveryClient interface {
	// Discover what entities the user function wishes to serve.
	Discover(ctx context.Context, in *ProxyInfo, opts ...grpc.CallOption) (*EntitySpec, error)
	// Report an error back to the user function. This will only be invoked to tell the user function
	// that it has done something wrong, eg, violated the protocol, tried to use an entity type that
	// isn't supported, or attempted to forward to an entity that doesn't exist, etc. These messages
	// should be logged clearly for debugging purposes.
	ReportError(ctx context.Context, in *UserFunctionError, opts ...grpc.CallOption) (*empty.Empty, error)
}

EntityDiscoveryClient is the client API for EntityDiscovery 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 EntityDiscoveryServer

type EntityDiscoveryServer interface {
	// Discover what entities the user function wishes to serve.
	Discover(context.Context, *ProxyInfo) (*EntitySpec, error)
	// Report an error back to the user function. This will only be invoked to tell the user function
	// that it has done something wrong, eg, violated the protocol, tried to use an entity type that
	// isn't supported, or attempted to forward to an entity that doesn't exist, etc. These messages
	// should be logged clearly for debugging purposes.
	ReportError(context.Context, *UserFunctionError) (*empty.Empty, error)
	// contains filtered or unexported methods
}

EntityDiscoveryServer is the server API for EntityDiscovery service. All implementations must embed UnimplementedEntityDiscoveryServer for forward compatibility

type EntityPassivationStrategy added in v0.3.0

type EntityPassivationStrategy struct {

	// Types that are assignable to Strategy:
	//	*EntityPassivationStrategy_Timeout
	Strategy isEntityPassivationStrategy_Strategy `protobuf_oneof:"strategy"`
	// contains filtered or unexported fields
}

The semantics is to provide a flexible way for entity user functions to configure the passivation strategy. This strategy is sent to the proxy at discovery time allowing the proxy to configure the corresponding entities. The only passivation strategy supported is the timeout strategy and configuring this is optional for the entity. If an entity user function does not configure the passivation strategy the proxy uses its fallback default value.

The passivation strategy for the entity user function.

func (*EntityPassivationStrategy) Descriptor deprecated added in v0.3.0

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

Deprecated: Use EntityPassivationStrategy.ProtoReflect.Descriptor instead.

func (*EntityPassivationStrategy) GetStrategy added in v0.3.0

func (m *EntityPassivationStrategy) GetStrategy() isEntityPassivationStrategy_Strategy

func (*EntityPassivationStrategy) GetTimeout added in v0.3.0

func (*EntityPassivationStrategy) ProtoMessage added in v0.3.0

func (*EntityPassivationStrategy) ProtoMessage()

func (*EntityPassivationStrategy) ProtoReflect added in v0.3.0

func (*EntityPassivationStrategy) Reset added in v0.3.0

func (x *EntityPassivationStrategy) Reset()

func (*EntityPassivationStrategy) String added in v0.3.0

func (x *EntityPassivationStrategy) String() string

type EntityPassivationStrategy_Timeout added in v0.3.0

type EntityPassivationStrategy_Timeout struct {
	// the timeout passivation strategy.
	Timeout *TimeoutPassivationStrategy `protobuf:"bytes,1,opt,name=timeout,proto3,oneof"`
}

type EntitySpec

type EntitySpec struct {

	// This should be the Descriptors.FileDescriptorSet in proto serialized from as generated by:
	// protoc --include_imports \
	// --proto_path=<proto file directory> \
	// --descriptor_set_out=user-function.desc \
	// <path to .proto files>
	Proto []byte `protobuf:"bytes,1,opt,name=proto,proto3" json:"proto,omitempty"`
	// The entities being served.
	Entities []*Entity `protobuf:"bytes,2,rep,name=entities,proto3" json:"entities,omitempty"`
	// Optional information about the service.
	ServiceInfo *ServiceInfo `protobuf:"bytes,3,opt,name=service_info,json=serviceInfo,proto3" json:"service_info,omitempty"`
	// contains filtered or unexported fields
}

func (*EntitySpec) Descriptor deprecated

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

Deprecated: Use EntitySpec.ProtoReflect.Descriptor instead.

func (*EntitySpec) GetEntities

func (x *EntitySpec) GetEntities() []*Entity

func (*EntitySpec) GetProto

func (x *EntitySpec) GetProto() []byte

func (*EntitySpec) GetServiceInfo

func (x *EntitySpec) GetServiceInfo() *ServiceInfo

func (*EntitySpec) ProtoMessage

func (*EntitySpec) ProtoMessage()

func (*EntitySpec) ProtoReflect added in v0.2.0

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

func (*EntitySpec) Reset

func (x *EntitySpec) Reset()

func (*EntitySpec) String

func (x *EntitySpec) String() string

type Failure

type Failure struct {

	// The id of the command being replied to. Must match the input command.
	CommandId int64 `protobuf:"varint,1,opt,name=command_id,json=commandId,proto3" json:"command_id,omitempty"`
	// A description of the error.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Whether this failure should trigger an entity restart.
	Restart bool `protobuf:"varint,3,opt,name=restart,proto3" json:"restart,omitempty"`
	// contains filtered or unexported fields
}

A failure reply. If this is returned, it will be translated into a gRPC unknown error with the corresponding description if supplied.

func (*Failure) Descriptor deprecated

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

Deprecated: Use Failure.ProtoReflect.Descriptor instead.

func (*Failure) GetCommandId

func (x *Failure) GetCommandId() int64

func (*Failure) GetDescription

func (x *Failure) GetDescription() string

func (*Failure) GetRestart added in v0.2.0

func (x *Failure) GetRestart() bool

func (*Failure) ProtoMessage

func (*Failure) ProtoMessage()

func (*Failure) ProtoReflect added in v0.2.0

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

func (*Failure) Reset

func (x *Failure) Reset()

func (*Failure) String

func (x *Failure) String() string

type Forward

type Forward struct {

	// The name of the service to forward to.
	ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// The name of the command.
	CommandName string `protobuf:"bytes,2,opt,name=command_name,json=commandName,proto3" json:"command_name,omitempty"`
	// The payload.
	Payload *any.Any `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// The metadata to include with the forward
	Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Forwards handling of this request to another entity.

func (*Forward) Descriptor deprecated

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

Deprecated: Use Forward.ProtoReflect.Descriptor instead.

func (*Forward) GetCommandName

func (x *Forward) GetCommandName() string

func (*Forward) GetMetadata added in v0.2.0

func (x *Forward) GetMetadata() *Metadata

func (*Forward) GetPayload

func (x *Forward) GetPayload() *any.Any

func (*Forward) GetServiceName

func (x *Forward) GetServiceName() string

func (*Forward) ProtoMessage

func (*Forward) ProtoMessage()

func (*Forward) ProtoReflect added in v0.2.0

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

func (*Forward) Reset

func (x *Forward) Reset()

func (*Forward) String

func (x *Forward) String() string

type Metadata added in v0.2.0

type Metadata struct {

	// The metadata entries.
	Entries []*MetadataEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

Transport-specific metadata associated with a message.

The semantics of the metadata are not defined in this protocol, but rather, depend on the transport on which a particular instance of the metadata maps to. What keys or values are allowed or disallowed, whether duplicate values for the same key are allowed and how they are handled, and whether key names are case sensitive or not, are all undefined in the context of the Cloudstate protocol.

If a metadata entry associated with a message can't be expressed in an underlying transport, for example, due to invalid characters in a key or value, the behavior of the proxy is undefined. This is because metadata is transport specific, so if the user function chooses to use metadata, it is choosing to be specific to a particular transport, which is beyond the scope of the Cloudstate protocol, and it's therefore the user function's responsibility to adhere to the semantics of that transport. The proxy MAY decide to drop metadata entries if it knows they are invalid or unsupported. If a metadata entry is dropped, the proxy MAY inform the user function that the entry was dropped by sending an error message to the EntityDiscovery.ReportError gRPC call.

The metadata MAY also contain CloudEvent metadata. If a message comes from a Cloudstate event source, the Cloudstate proxy MUST attach CloudEvent metadata to it if the event doesn't already have CloudEvent metadata attached to it. This metadata SHALL be encoded according to the binary mode of the CloudEvent HTTP protocol binding, which can be found here:

https://github.com/cloudevents/spec/blob/master/http-protocol-binding.md

The Cloudstate proxy MAY synthesize appropriate values for Cloudstate metadata if no equivalent metadata exists in the event source, for example, if there is no type, the Cloudstate proxy MAY use the name of the gRPC message as the CloudEvent type, and if there is no source, the Cloudstate proxy MAY use the name of the topic as the source.

If an incoming message does have CloudEvent metadata attached to it, the Cloudstate proxy MUST transcode that CloudEvent metadata to the HTTP protocol binding as described above.

Messages sent from the user function to an event destination MAY include CloudEvent metadata. If they include any CloudEvent metadata, they MUST include all required CloudEvent attributes, including id, source, specversion and type. The behavior of the proxy is undefined if some of these attributes, but not others, are included - the proxy MAY ignore them all, or MAY generate values itself, but SHOULD NOT fail sending the message. If the destination for the message is an event destination, the Cloudstate proxy MUST transcode the supplied Cloudstate metadata to a binding appropriate for the underlying transport for that event destination, it MUST NOT pass the CloudEvent metadata as is unless the transport uses the same binding rules.

func (*Metadata) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetEntries added in v0.2.0

func (x *Metadata) GetEntries() []*MetadataEntry

func (*Metadata) ProtoMessage added in v0.2.0

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect added in v0.2.0

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

func (*Metadata) Reset added in v0.2.0

func (x *Metadata) Reset()

func (*Metadata) String added in v0.2.0

func (x *Metadata) String() string

type MetadataEntry added in v0.2.0

type MetadataEntry struct {

	// Key for the entry. Valid keys depend on the transport from or to which this metadata is sent.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The value.
	//
	// Types that are assignable to Value:
	//	*MetadataEntry_StringValue
	//	*MetadataEntry_BytesValue
	Value isMetadataEntry_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

A metadata entry.

func (*MetadataEntry) Descriptor deprecated added in v0.2.0

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

Deprecated: Use MetadataEntry.ProtoReflect.Descriptor instead.

func (*MetadataEntry) GetBytesValue added in v0.2.0

func (x *MetadataEntry) GetBytesValue() []byte

func (*MetadataEntry) GetKey added in v0.2.0

func (x *MetadataEntry) GetKey() string

func (*MetadataEntry) GetStringValue added in v0.2.0

func (x *MetadataEntry) GetStringValue() string

func (*MetadataEntry) GetValue added in v0.2.0

func (m *MetadataEntry) GetValue() isMetadataEntry_Value

func (*MetadataEntry) ProtoMessage added in v0.2.0

func (*MetadataEntry) ProtoMessage()

func (*MetadataEntry) ProtoReflect added in v0.2.0

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

func (*MetadataEntry) Reset added in v0.2.0

func (x *MetadataEntry) Reset()

func (*MetadataEntry) String added in v0.2.0

func (x *MetadataEntry) String() string

type MetadataEntry_BytesValue added in v0.2.0

type MetadataEntry_BytesValue struct {
	// A bytes value. Valid values depend on the transport from or which this metadata is sent.
	//
	// If the transport does not support bytes values, the behavior of the Cloudstate proxy is undefined from the
	// point of view of this protocol. If there is a convention in the protocol for encoding bytes values as
	// Base64 encoded strings, then the Cloudstate proxy MAY do that.
	BytesValue []byte `protobuf:"bytes,3,opt,name=bytes_value,json=bytesValue,proto3,oneof"`
}

type MetadataEntry_StringValue added in v0.2.0

type MetadataEntry_StringValue struct {
	// A string value. Valid values depend on the transport from or which this metadata is sent.
	//
	// If the transport does not support string values, the behavior of the Cloudstate proxy is undefined from the
	// point of view of this protocol. If there is a convention in the protocol for encoding string values as
	// UTF-8 bytes, then the Cloudstate proxy MAY do that.
	StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type ProxyInfo

type ProxyInfo struct {
	ProtocolMajorVersion int32    `protobuf:"varint,1,opt,name=protocol_major_version,json=protocolMajorVersion,proto3" json:"protocol_major_version,omitempty"`
	ProtocolMinorVersion int32    `protobuf:"varint,2,opt,name=protocol_minor_version,json=protocolMinorVersion,proto3" json:"protocol_minor_version,omitempty"`
	ProxyName            string   `protobuf:"bytes,3,opt,name=proxy_name,json=proxyName,proto3" json:"proxy_name,omitempty"`
	ProxyVersion         string   `protobuf:"bytes,4,opt,name=proxy_version,json=proxyVersion,proto3" json:"proxy_version,omitempty"`
	SupportedEntityTypes []string `protobuf:"bytes,5,rep,name=supported_entity_types,json=supportedEntityTypes,proto3" json:"supported_entity_types,omitempty"`
	// contains filtered or unexported fields
}

func (*ProxyInfo) Descriptor deprecated

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

Deprecated: Use ProxyInfo.ProtoReflect.Descriptor instead.

func (*ProxyInfo) GetProtocolMajorVersion

func (x *ProxyInfo) GetProtocolMajorVersion() int32

func (*ProxyInfo) GetProtocolMinorVersion

func (x *ProxyInfo) GetProtocolMinorVersion() int32

func (*ProxyInfo) GetProxyName

func (x *ProxyInfo) GetProxyName() string

func (*ProxyInfo) GetProxyVersion

func (x *ProxyInfo) GetProxyVersion() string

func (*ProxyInfo) GetSupportedEntityTypes

func (x *ProxyInfo) GetSupportedEntityTypes() []string

func (*ProxyInfo) ProtoMessage

func (*ProxyInfo) ProtoMessage()

func (*ProxyInfo) ProtoReflect added in v0.2.0

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

func (*ProxyInfo) Reset

func (x *ProxyInfo) Reset()

func (*ProxyInfo) String

func (x *ProxyInfo) String() string

type Reply

type Reply struct {

	// The reply payload
	Payload *any.Any `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// Metadata for the reply
	//
	// Not all transports support per message metadata, for example, gRPC doesn't. The Cloudstate proxy MAY ignore the
	// metadata in this case, or it MAY lift the metadata into another place, for example, in gRPC, a unary call MAY
	// have its reply metadata placed in the headers of the HTTP response, or the first reply to a streamed call MAY
	// have its metadata placed in the headers of the HTTP response.
	//
	// If the metadata is ignored, the Cloudstate proxy MAY notify the user function by sending an error message to the
	// EntityDiscovery.ReportError gRPC call.
	Metadata *Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

A reply to the sender.

func (*Reply) Descriptor deprecated

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

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetMetadata added in v0.2.0

func (x *Reply) GetMetadata() *Metadata

func (*Reply) GetPayload

func (x *Reply) GetPayload() *any.Any

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect added in v0.2.0

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

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

type ServerError added in v0.2.0

type ServerError struct {
	Failure *Failure
	Err     error
}

func (ServerError) Error added in v0.2.0

func (e ServerError) Error() string

func (ServerError) Is added in v0.2.0

func (e ServerError) Is(err error) bool

func (ServerError) Unwrap added in v0.2.0

func (e ServerError) Unwrap() error

type ServiceInfo

type ServiceInfo struct {

	// The name of the service, eg, "shopping-cart".
	ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// The version of the service.
	ServiceVersion string `protobuf:"bytes,2,opt,name=service_version,json=serviceVersion,proto3" json:"service_version,omitempty"`
	// A description of the runtime for the service. Can be anything, but examples might be:
	// - node v10.15.2
	// - OpenJDK Runtime Environment 1.8.0_192-b12
	ServiceRuntime string `protobuf:"bytes,3,opt,name=service_runtime,json=serviceRuntime,proto3" json:"service_runtime,omitempty"`
	// If using a support library, the name of that library, eg "cloudstate"
	SupportLibraryName string `protobuf:"bytes,4,opt,name=support_library_name,json=supportLibraryName,proto3" json:"support_library_name,omitempty"`
	// The version of the support library being used.
	SupportLibraryVersion string `` /* 126-byte string literal not displayed */
	// Cloudstate protocol major version accepted by the support library.
	ProtocolMajorVersion int32 `protobuf:"varint,6,opt,name=protocol_major_version,json=protocolMajorVersion,proto3" json:"protocol_major_version,omitempty"`
	// Cloudstate protocol minor version accepted by the support library.
	ProtocolMinorVersion int32 `protobuf:"varint,7,opt,name=protocol_minor_version,json=protocolMinorVersion,proto3" json:"protocol_minor_version,omitempty"`
	// contains filtered or unexported fields
}

Information about the service that proxy is proxying to. All of the information in here is optional. It may be useful for debug purposes.

func (*ServiceInfo) Descriptor deprecated

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

Deprecated: Use ServiceInfo.ProtoReflect.Descriptor instead.

func (*ServiceInfo) GetProtocolMajorVersion added in v0.2.0

func (x *ServiceInfo) GetProtocolMajorVersion() int32

func (*ServiceInfo) GetProtocolMinorVersion added in v0.2.0

func (x *ServiceInfo) GetProtocolMinorVersion() int32

func (*ServiceInfo) GetServiceName

func (x *ServiceInfo) GetServiceName() string

func (*ServiceInfo) GetServiceRuntime

func (x *ServiceInfo) GetServiceRuntime() string

func (*ServiceInfo) GetServiceVersion

func (x *ServiceInfo) GetServiceVersion() string

func (*ServiceInfo) GetSupportLibraryName

func (x *ServiceInfo) GetSupportLibraryName() string

func (*ServiceInfo) GetSupportLibraryVersion

func (x *ServiceInfo) GetSupportLibraryVersion() string

func (*ServiceInfo) ProtoMessage

func (*ServiceInfo) ProtoMessage()

func (*ServiceInfo) ProtoReflect added in v0.2.0

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

func (*ServiceInfo) Reset

func (x *ServiceInfo) Reset()

func (*ServiceInfo) String

func (x *ServiceInfo) String() string

type SideEffect

type SideEffect struct {

	// The name of the service to perform the side effect on.
	ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	// The name of the command.
	CommandName string `protobuf:"bytes,2,opt,name=command_name,json=commandName,proto3" json:"command_name,omitempty"`
	// The payload of the command.
	Payload *any.Any `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// Whether this side effect should be performed synchronously, ie, before the reply is eventually
	// sent, or not.
	Synchronous bool `protobuf:"varint,4,opt,name=synchronous,proto3" json:"synchronous,omitempty"`
	// The metadata to include with the side effect
	Metadata *Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

A side effect to be done after this command is handled.

func (*SideEffect) Descriptor deprecated

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

Deprecated: Use SideEffect.ProtoReflect.Descriptor instead.

func (*SideEffect) GetCommandName

func (x *SideEffect) GetCommandName() string

func (*SideEffect) GetMetadata added in v0.2.0

func (x *SideEffect) GetMetadata() *Metadata

func (*SideEffect) GetPayload

func (x *SideEffect) GetPayload() *any.Any

func (*SideEffect) GetServiceName

func (x *SideEffect) GetServiceName() string

func (*SideEffect) GetSynchronous

func (x *SideEffect) GetSynchronous() bool

func (*SideEffect) ProtoMessage

func (*SideEffect) ProtoMessage()

func (*SideEffect) ProtoReflect added in v0.2.0

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

func (*SideEffect) Reset

func (x *SideEffect) Reset()

func (*SideEffect) String

func (x *SideEffect) String() string

type StreamCancelled

type StreamCancelled struct {

	// The ID of the entity
	EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
	// The command id
	Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamCancelled) Descriptor deprecated

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

Deprecated: Use StreamCancelled.ProtoReflect.Descriptor instead.

func (*StreamCancelled) GetEntityId

func (x *StreamCancelled) GetEntityId() string

func (*StreamCancelled) GetId

func (x *StreamCancelled) GetId() int64

func (*StreamCancelled) ProtoMessage

func (*StreamCancelled) ProtoMessage()

func (*StreamCancelled) ProtoReflect added in v0.2.0

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

func (*StreamCancelled) Reset

func (x *StreamCancelled) Reset()

func (*StreamCancelled) String

func (x *StreamCancelled) String() string

type TimeoutPassivationStrategy added in v0.3.0

type TimeoutPassivationStrategy struct {

	// The timeout in millis
	Timeout int64 `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

A passivation strategy based on a timeout. The idle timeout after which a user function's entity is passivated.

func (*TimeoutPassivationStrategy) Descriptor deprecated added in v0.3.0

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

Deprecated: Use TimeoutPassivationStrategy.ProtoReflect.Descriptor instead.

func (*TimeoutPassivationStrategy) GetTimeout added in v0.3.0

func (x *TimeoutPassivationStrategy) GetTimeout() int64

func (*TimeoutPassivationStrategy) ProtoMessage added in v0.3.0

func (*TimeoutPassivationStrategy) ProtoMessage()

func (*TimeoutPassivationStrategy) ProtoReflect added in v0.3.0

func (*TimeoutPassivationStrategy) Reset added in v0.3.0

func (x *TimeoutPassivationStrategy) Reset()

func (*TimeoutPassivationStrategy) String added in v0.3.0

func (x *TimeoutPassivationStrategy) String() string

type UnimplementedEntityDiscoveryServer

type UnimplementedEntityDiscoveryServer struct {
}

UnimplementedEntityDiscoveryServer must be embedded to have forward compatible implementations.

func (UnimplementedEntityDiscoveryServer) Discover

func (UnimplementedEntityDiscoveryServer) ReportError

type UnsafeEntityDiscoveryServer added in v0.3.0

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

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

type UserFunctionError

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

func (*UserFunctionError) Descriptor deprecated

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

Deprecated: Use UserFunctionError.ProtoReflect.Descriptor instead.

func (*UserFunctionError) GetMessage

func (x *UserFunctionError) GetMessage() string

func (*UserFunctionError) ProtoMessage

func (*UserFunctionError) ProtoMessage()

func (*UserFunctionError) ProtoReflect added in v0.2.0

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

func (*UserFunctionError) Reset

func (x *UserFunctionError) Reset()

func (*UserFunctionError) String

func (x *UserFunctionError) String() string

Jump to

Keyboard shortcuts

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