Documentation ¶
Overview ¶
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterStoaHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterStoaHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StoaClient) error
- func RegisterStoaHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterStoaHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StoaServer) error
- func RegisterStoaServer(s *grpc.Server, srv StoaServer)
- type ClientId
- func (*ClientId) Descriptor() ([]byte, []int)deprecated
- func (x *ClientId) GetEntityName() string
- func (x *ClientId) GetId() []byte
- func (x *ClientId) GetPayload() []byte
- func (*ClientId) ProtoMessage()
- func (x *ClientId) ProtoReflect() protoreflect.Message
- func (x *ClientId) Reset()
- func (x *ClientId) String() string
- func (m *ClientId) Validate() error
- type ClientIdValidationError
- type ClusterCommand
- func (*ClusterCommand) Descriptor() ([]byte, []int)deprecated
- func (x *ClusterCommand) GetBarrierEnabled() bool
- func (x *ClusterCommand) GetBarrierMillis() int64
- func (x *ClusterCommand) GetClientId() *ClientId
- func (x *ClusterCommand) GetCommand() ClusterCommand_Type
- func (x *ClusterCommand) GetEntity() *Entity
- func (x *ClusterCommand) GetKey() *Key
- func (x *ClusterCommand) GetKeyValue() *KeyValue
- func (m *ClusterCommand) GetPayload() isClusterCommand_Payload
- func (x *ClusterCommand) GetTtlEnabled() bool
- func (x *ClusterCommand) GetTtlMillis() int64
- func (x *ClusterCommand) GetValue() *Value
- func (*ClusterCommand) ProtoMessage()
- func (x *ClusterCommand) ProtoReflect() protoreflect.Message
- func (x *ClusterCommand) Reset()
- func (x *ClusterCommand) String() string
- func (m *ClusterCommand) Validate() error
- type ClusterCommandValidationError
- func (e ClusterCommandValidationError) Cause() error
- func (e ClusterCommandValidationError) Error() string
- func (e ClusterCommandValidationError) ErrorName() string
- func (e ClusterCommandValidationError) Field() string
- func (e ClusterCommandValidationError) Key() bool
- func (e ClusterCommandValidationError) Reason() string
- type ClusterCommand_ClientId
- type ClusterCommand_Entity
- type ClusterCommand_Key
- type ClusterCommand_KeyValue
- type ClusterCommand_Type
- func (ClusterCommand_Type) Descriptor() protoreflect.EnumDescriptor
- func (x ClusterCommand_Type) Enum() *ClusterCommand_Type
- func (ClusterCommand_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x ClusterCommand_Type) Number() protoreflect.EnumNumber
- func (x ClusterCommand_Type) String() string
- func (ClusterCommand_Type) Type() protoreflect.EnumType
- type ClusterCommand_Value
- type Discovery
- func (*Discovery) Descriptor() ([]byte, []int)deprecated
- func (x *Discovery) GetBindIp() string
- func (x *Discovery) GetBindPort() int32
- func (x *Discovery) GetGrpcIp() string
- func (x *Discovery) GetGrpcPort() int32
- func (x *Discovery) GetId() string
- func (x *Discovery) GetLeader() bool
- func (*Discovery) ProtoMessage()
- func (x *Discovery) ProtoReflect() protoreflect.Message
- func (x *Discovery) Reset()
- func (x *Discovery) String() string
- func (m *Discovery) Validate() error
- type DiscoveryValidationError
- type Empty
- type EmptyValidationError
- type Entity
- type EntityValidationError
- type Key
- type KeyValidationError
- type KeyValue
- func (*KeyValue) Descriptor() ([]byte, []int)deprecated
- func (x *KeyValue) GetEntityName() string
- func (x *KeyValue) GetKey() []byte
- func (x *KeyValue) GetValue() []byte
- func (*KeyValue) ProtoMessage()
- func (x *KeyValue) ProtoReflect() protoreflect.Message
- func (x *KeyValue) Reset()
- func (x *KeyValue) String() string
- func (m *KeyValue) Validate() error
- type KeyValueValidationError
- type Result
- type ResultValidationError
- type StoaClient
- type StoaServer
- type Stoa_DictionaryRangeClient
- type Stoa_DictionaryRangeServer
- type UnimplementedStoaServer
- func (UnimplementedStoaServer) DictionaryClear(context.Context, *Entity) (*Empty, error)
- func (UnimplementedStoaServer) DictionaryGet(context.Context, *Key) (*Value, error)
- func (UnimplementedStoaServer) DictionaryPut(context.Context, *KeyValue) (*Value, error)
- func (UnimplementedStoaServer) DictionaryPutIfAbsent(context.Context, *KeyValue) (*Result, error)
- func (UnimplementedStoaServer) DictionaryRange(*Entity, Stoa_DictionaryRangeServer) error
- func (UnimplementedStoaServer) DictionaryRemove(context.Context, *Key) (*Result, error)
- func (UnimplementedStoaServer) DictionarySize(context.Context, *Entity) (*Value, error)
- func (UnimplementedStoaServer) MutexTryLock(context.Context, *ClientId) (*Result, error)
- func (UnimplementedStoaServer) MutexUnlock(context.Context, *ClientId) (*Result, error)
- func (UnimplementedStoaServer) Ping(context.Context, *ClientId) (*Empty, error)
- func (UnimplementedStoaServer) QueueClear(context.Context, *Entity) (*Empty, error)
- func (UnimplementedStoaServer) QueueOffer(context.Context, *Value) (*Result, error)
- func (UnimplementedStoaServer) QueuePeek(context.Context, *Entity) (*Value, error)
- func (UnimplementedStoaServer) QueuePoll(context.Context, *Entity) (*Value, error)
- func (UnimplementedStoaServer) QueueSize(context.Context, *Entity) (*Value, error)
- type UnsafeStoaServer
- type Value
- type ValueValidationError
Constants ¶
This section is empty.
Variables ¶
var ( ClusterCommand_Type_name = map[int32]string{ 0: "RESERVED", 1: "QUEUE_SIZE", 2: "QUEUE_CLEAR", 3: "QUEUE_OFFER", 4: "QUEUE_POLL", 5: "QUEUE_PEEK", 6: "DICTIONARY_SIZE", 7: "DICTIONARY_CLEAR", 8: "DICTIONARY_PUT_IF_ABSENT", 9: "DICTIONARY_PUT", 10: "DICTIONARY_GET", 11: "DICTIONARY_REMOVE", 12: "DICTIONARY_RANGE", 13: "MUTEX_TRY_LOCK", 14: "MUTEX_UNLOCK", 15: "SERVICE_PING", 16: "MAX_INDEX", } ClusterCommand_Type_value = map[string]int32{ "RESERVED": 0, "QUEUE_SIZE": 1, "QUEUE_CLEAR": 2, "QUEUE_OFFER": 3, "QUEUE_POLL": 4, "QUEUE_PEEK": 5, "DICTIONARY_SIZE": 6, "DICTIONARY_CLEAR": 7, "DICTIONARY_PUT_IF_ABSENT": 8, "DICTIONARY_PUT": 9, "DICTIONARY_GET": 10, "DICTIONARY_REMOVE": 11, "DICTIONARY_RANGE": 12, "MUTEX_TRY_LOCK": 13, "MUTEX_UNLOCK": 14, "SERVICE_PING": 15, "MAX_INDEX": 16, } )
Enum value maps for ClusterCommand_Type.
var File_common_proto protoreflect.FileDescriptor
var File_raft_proto protoreflect.FileDescriptor
var File_stoa_proto protoreflect.FileDescriptor
Functions ¶
func RegisterStoaHandler ¶
RegisterStoaHandler registers the http handlers for service Stoa to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterStoaHandlerClient ¶
RegisterStoaHandlerClient registers the http handlers for service Stoa to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StoaClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StoaClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "StoaClient" to call the correct interceptors.
func RegisterStoaHandlerFromEndpoint ¶
func RegisterStoaHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterStoaHandlerFromEndpoint is same as RegisterStoaHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterStoaHandlerServer ¶
RegisterStoaHandlerServer registers the http handlers for service Stoa to "mux". UnaryRPC :call StoaServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterStoaHandlerFromEndpoint instead.
func RegisterStoaServer ¶
func RegisterStoaServer(s *grpc.Server, srv StoaServer)
Types ¶
type ClientId ¶
type ClientId struct { EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` Id []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
ClientId contains Client ID.
func (*ClientId) Descriptor
deprecated
func (*ClientId) GetEntityName ¶
func (*ClientId) GetPayload ¶
func (*ClientId) ProtoMessage ¶
func (*ClientId) ProtoMessage()
func (*ClientId) ProtoReflect ¶
func (x *ClientId) ProtoReflect() protoreflect.Message
type ClientIdValidationError ¶
type ClientIdValidationError struct {
// contains filtered or unexported fields
}
ClientIdValidationError is the validation error returned by ClientId.Validate if the designated constraints aren't met.
func (ClientIdValidationError) Cause ¶
func (e ClientIdValidationError) Cause() error
Cause function returns cause value.
func (ClientIdValidationError) Error ¶
func (e ClientIdValidationError) Error() string
Error satisfies the builtin error interface
func (ClientIdValidationError) ErrorName ¶
func (e ClientIdValidationError) ErrorName() string
ErrorName returns error name.
func (ClientIdValidationError) Field ¶
func (e ClientIdValidationError) Field() string
Field function returns field value.
func (ClientIdValidationError) Key ¶
func (e ClientIdValidationError) Key() bool
Key function returns key value.
func (ClientIdValidationError) Reason ¶
func (e ClientIdValidationError) Reason() string
Reason function returns reason value.
type ClusterCommand ¶
type ClusterCommand struct { Command ClusterCommand_Type `protobuf:"varint,1,opt,name=command,proto3,enum=github.com.vontikov.stoa.v1.ClusterCommand_Type" json:"command,omitempty"` TtlEnabled bool `protobuf:"varint,2,opt,name=ttl_enabled,json=ttlEnabled,proto3" json:"ttl_enabled,omitempty"` TtlMillis int64 `protobuf:"varint,3,opt,name=ttl_millis,json=ttlMillis,proto3" json:"ttl_millis,omitempty"` BarrierEnabled bool `protobuf:"varint,4,opt,name=barrier_enabled,json=barrierEnabled,proto3" json:"barrier_enabled,omitempty"` BarrierMillis int64 `protobuf:"varint,5,opt,name=barrier_millis,json=barrierMillis,proto3" json:"barrier_millis,omitempty"` // Types that are assignable to Payload: // *ClusterCommand_Entity // *ClusterCommand_Value // *ClusterCommand_Key // *ClusterCommand_KeyValue // *ClusterCommand_ClientId Payload isClusterCommand_Payload `protobuf_oneof:"payload"` // contains filtered or unexported fields }
ClusterCommand contains Raft claster log command.
func (*ClusterCommand) Descriptor
deprecated
func (*ClusterCommand) Descriptor() ([]byte, []int)
Deprecated: Use ClusterCommand.ProtoReflect.Descriptor instead.
func (*ClusterCommand) GetBarrierEnabled ¶
func (x *ClusterCommand) GetBarrierEnabled() bool
func (*ClusterCommand) GetBarrierMillis ¶
func (x *ClusterCommand) GetBarrierMillis() int64
func (*ClusterCommand) GetClientId ¶
func (x *ClusterCommand) GetClientId() *ClientId
func (*ClusterCommand) GetCommand ¶
func (x *ClusterCommand) GetCommand() ClusterCommand_Type
func (*ClusterCommand) GetEntity ¶
func (x *ClusterCommand) GetEntity() *Entity
func (*ClusterCommand) GetKey ¶
func (x *ClusterCommand) GetKey() *Key
func (*ClusterCommand) GetKeyValue ¶
func (x *ClusterCommand) GetKeyValue() *KeyValue
func (*ClusterCommand) GetPayload ¶
func (m *ClusterCommand) GetPayload() isClusterCommand_Payload
func (*ClusterCommand) GetTtlEnabled ¶
func (x *ClusterCommand) GetTtlEnabled() bool
func (*ClusterCommand) GetTtlMillis ¶
func (x *ClusterCommand) GetTtlMillis() int64
func (*ClusterCommand) GetValue ¶
func (x *ClusterCommand) GetValue() *Value
func (*ClusterCommand) ProtoMessage ¶
func (*ClusterCommand) ProtoMessage()
func (*ClusterCommand) ProtoReflect ¶
func (x *ClusterCommand) ProtoReflect() protoreflect.Message
func (*ClusterCommand) Reset ¶
func (x *ClusterCommand) Reset()
func (*ClusterCommand) String ¶
func (x *ClusterCommand) String() string
func (*ClusterCommand) Validate ¶
func (m *ClusterCommand) Validate() error
Validate checks the field values on ClusterCommand with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type ClusterCommandValidationError ¶
type ClusterCommandValidationError struct {
// contains filtered or unexported fields
}
ClusterCommandValidationError is the validation error returned by ClusterCommand.Validate if the designated constraints aren't met.
func (ClusterCommandValidationError) Cause ¶
func (e ClusterCommandValidationError) Cause() error
Cause function returns cause value.
func (ClusterCommandValidationError) Error ¶
func (e ClusterCommandValidationError) Error() string
Error satisfies the builtin error interface
func (ClusterCommandValidationError) ErrorName ¶
func (e ClusterCommandValidationError) ErrorName() string
ErrorName returns error name.
func (ClusterCommandValidationError) Field ¶
func (e ClusterCommandValidationError) Field() string
Field function returns field value.
func (ClusterCommandValidationError) Key ¶
func (e ClusterCommandValidationError) Key() bool
Key function returns key value.
func (ClusterCommandValidationError) Reason ¶
func (e ClusterCommandValidationError) Reason() string
Reason function returns reason value.
type ClusterCommand_ClientId ¶
type ClusterCommand_ClientId struct {
ClientId *ClientId `protobuf:"bytes,10,opt,name=client_id,json=clientId,proto3,oneof"`
}
type ClusterCommand_Entity ¶
type ClusterCommand_Entity struct {
Entity *Entity `protobuf:"bytes,6,opt,name=entity,proto3,oneof"`
}
type ClusterCommand_Key ¶
type ClusterCommand_Key struct {
Key *Key `protobuf:"bytes,8,opt,name=key,proto3,oneof"`
}
type ClusterCommand_KeyValue ¶
type ClusterCommand_KeyValue struct {
KeyValue *KeyValue `protobuf:"bytes,9,opt,name=key_value,json=keyValue,proto3,oneof"`
}
type ClusterCommand_Type ¶
type ClusterCommand_Type int32
Type is a Raft claster command type.
const ( ClusterCommand_RESERVED ClusterCommand_Type = 0 ClusterCommand_QUEUE_SIZE ClusterCommand_Type = 1 ClusterCommand_QUEUE_CLEAR ClusterCommand_Type = 2 ClusterCommand_QUEUE_OFFER ClusterCommand_Type = 3 ClusterCommand_QUEUE_POLL ClusterCommand_Type = 4 ClusterCommand_QUEUE_PEEK ClusterCommand_Type = 5 ClusterCommand_DICTIONARY_SIZE ClusterCommand_Type = 6 ClusterCommand_DICTIONARY_CLEAR ClusterCommand_Type = 7 ClusterCommand_DICTIONARY_PUT_IF_ABSENT ClusterCommand_Type = 8 ClusterCommand_DICTIONARY_PUT ClusterCommand_Type = 9 ClusterCommand_DICTIONARY_GET ClusterCommand_Type = 10 ClusterCommand_DICTIONARY_REMOVE ClusterCommand_Type = 11 ClusterCommand_DICTIONARY_RANGE ClusterCommand_Type = 12 ClusterCommand_MUTEX_TRY_LOCK ClusterCommand_Type = 13 ClusterCommand_MUTEX_UNLOCK ClusterCommand_Type = 14 ClusterCommand_SERVICE_PING ClusterCommand_Type = 15 ClusterCommand_MAX_INDEX ClusterCommand_Type = 16 )
func (ClusterCommand_Type) Descriptor ¶
func (ClusterCommand_Type) Descriptor() protoreflect.EnumDescriptor
func (ClusterCommand_Type) Enum ¶
func (x ClusterCommand_Type) Enum() *ClusterCommand_Type
func (ClusterCommand_Type) EnumDescriptor
deprecated
func (ClusterCommand_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use ClusterCommand_Type.Descriptor instead.
func (ClusterCommand_Type) Number ¶
func (x ClusterCommand_Type) Number() protoreflect.EnumNumber
func (ClusterCommand_Type) String ¶
func (x ClusterCommand_Type) String() string
func (ClusterCommand_Type) Type ¶
func (ClusterCommand_Type) Type() protoreflect.EnumType
type ClusterCommand_Value ¶
type ClusterCommand_Value struct {
Value *Value `protobuf:"bytes,7,opt,name=value,proto3,oneof"`
}
type Discovery ¶
type Discovery struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Peer ID BindIp string `protobuf:"bytes,2,opt,name=bind_ip,json=bindIp,proto3" json:"bind_ip,omitempty"` // bind IP BindPort int32 `protobuf:"varint,3,opt,name=bind_port,json=bindPort,proto3" json:"bind_port,omitempty"` // bind port GrpcIp string `protobuf:"bytes,4,opt,name=grpc_ip,json=grpcIp,proto3" json:"grpc_ip,omitempty"` // gRPC IP GrpcPort int32 `protobuf:"varint,5,opt,name=grpc_port,json=grpcPort,proto3" json:"grpc_port,omitempty"` // gRPC port Leader bool `protobuf:"varint,6,opt,name=leader,proto3" json:"leader,omitempty"` // leader status // contains filtered or unexported fields }
Discovery contains Raft Peer information.
func (*Discovery) Descriptor
deprecated
func (*Discovery) GetBindPort ¶
func (*Discovery) GetGrpcPort ¶
func (*Discovery) ProtoMessage ¶
func (*Discovery) ProtoMessage()
func (*Discovery) ProtoReflect ¶
func (x *Discovery) ProtoReflect() protoreflect.Message
type DiscoveryValidationError ¶
type DiscoveryValidationError struct {
// contains filtered or unexported fields
}
DiscoveryValidationError is the validation error returned by Discovery.Validate if the designated constraints aren't met.
func (DiscoveryValidationError) Cause ¶
func (e DiscoveryValidationError) Cause() error
Cause function returns cause value.
func (DiscoveryValidationError) Error ¶
func (e DiscoveryValidationError) Error() string
Error satisfies the builtin error interface
func (DiscoveryValidationError) ErrorName ¶
func (e DiscoveryValidationError) ErrorName() string
ErrorName returns error name.
func (DiscoveryValidationError) Field ¶
func (e DiscoveryValidationError) Field() string
Field function returns field value.
func (DiscoveryValidationError) Key ¶
func (e DiscoveryValidationError) Key() bool
Key function returns key value.
func (DiscoveryValidationError) Reason ¶
func (e DiscoveryValidationError) Reason() string
Reason function returns reason value.
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
Empty contains no data.
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type EmptyValidationError ¶
type EmptyValidationError struct {
// contains filtered or unexported fields
}
EmptyValidationError is the validation error returned by Empty.Validate if the designated constraints aren't met.
func (EmptyValidationError) Cause ¶
func (e EmptyValidationError) Cause() error
Cause function returns cause value.
func (EmptyValidationError) Error ¶
func (e EmptyValidationError) Error() string
Error satisfies the builtin error interface
func (EmptyValidationError) ErrorName ¶
func (e EmptyValidationError) ErrorName() string
ErrorName returns error name.
func (EmptyValidationError) Field ¶
func (e EmptyValidationError) Field() string
Field function returns field value.
func (EmptyValidationError) Key ¶
func (e EmptyValidationError) Key() bool
Key function returns key value.
func (EmptyValidationError) Reason ¶
func (e EmptyValidationError) Reason() string
Reason function returns reason value.
type Entity ¶
type Entity struct { EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` // contains filtered or unexported fields }
Entity is a Stoa entity.
func (*Entity) Descriptor
deprecated
func (*Entity) GetEntityName ¶
func (*Entity) ProtoMessage ¶
func (*Entity) ProtoMessage()
func (*Entity) ProtoReflect ¶
func (x *Entity) ProtoReflect() protoreflect.Message
type EntityValidationError ¶
type EntityValidationError struct {
// contains filtered or unexported fields
}
EntityValidationError is the validation error returned by Entity.Validate if the designated constraints aren't met.
func (EntityValidationError) Cause ¶
func (e EntityValidationError) Cause() error
Cause function returns cause value.
func (EntityValidationError) Error ¶
func (e EntityValidationError) Error() string
Error satisfies the builtin error interface
func (EntityValidationError) ErrorName ¶
func (e EntityValidationError) ErrorName() string
ErrorName returns error name.
func (EntityValidationError) Field ¶
func (e EntityValidationError) Field() string
Field function returns field value.
func (EntityValidationError) Key ¶
func (e EntityValidationError) Key() bool
Key function returns key value.
func (EntityValidationError) Reason ¶
func (e EntityValidationError) Reason() string
Reason function returns reason value.
type Key ¶
type Key struct { EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
Key contains Dictionary key.
func (*Key) Descriptor
deprecated
func (*Key) GetEntityName ¶
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
func (*Key) ProtoReflect ¶
func (x *Key) ProtoReflect() protoreflect.Message
type KeyValidationError ¶
type KeyValidationError struct {
// contains filtered or unexported fields
}
KeyValidationError is the validation error returned by Key.Validate if the designated constraints aren't met.
func (KeyValidationError) Cause ¶
func (e KeyValidationError) Cause() error
Cause function returns cause value.
func (KeyValidationError) Error ¶
func (e KeyValidationError) Error() string
Error satisfies the builtin error interface
func (KeyValidationError) ErrorName ¶
func (e KeyValidationError) ErrorName() string
ErrorName returns error name.
func (KeyValidationError) Field ¶
func (e KeyValidationError) Field() string
Field function returns field value.
func (KeyValidationError) Key ¶
func (e KeyValidationError) Key() bool
Key function returns key value.
func (KeyValidationError) Reason ¶
func (e KeyValidationError) Reason() string
Reason function returns reason value.
type KeyValue ¶
type KeyValue struct { EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
KeyValue contains Dictionary key-value pair.
func (*KeyValue) Descriptor
deprecated
func (*KeyValue) GetEntityName ¶
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
func (*KeyValue) ProtoReflect ¶
func (x *KeyValue) ProtoReflect() protoreflect.Message
type KeyValueValidationError ¶
type KeyValueValidationError struct {
// contains filtered or unexported fields
}
KeyValueValidationError is the validation error returned by KeyValue.Validate if the designated constraints aren't met.
func (KeyValueValidationError) Cause ¶
func (e KeyValueValidationError) Cause() error
Cause function returns cause value.
func (KeyValueValidationError) Error ¶
func (e KeyValueValidationError) Error() string
Error satisfies the builtin error interface
func (KeyValueValidationError) ErrorName ¶
func (e KeyValueValidationError) ErrorName() string
ErrorName returns error name.
func (KeyValueValidationError) Field ¶
func (e KeyValueValidationError) Field() string
Field function returns field value.
func (KeyValueValidationError) Key ¶
func (e KeyValueValidationError) Key() bool
Key function returns key value.
func (KeyValueValidationError) Reason ¶
func (e KeyValueValidationError) Reason() string
Reason function returns reason value.
type Result ¶
type Result struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
Result contains an operation result.
func (*Result) Descriptor
deprecated
func (*Result) GetPayload ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type ResultValidationError ¶
type ResultValidationError struct {
// contains filtered or unexported fields
}
ResultValidationError is the validation error returned by Result.Validate if the designated constraints aren't met.
func (ResultValidationError) Cause ¶
func (e ResultValidationError) Cause() error
Cause function returns cause value.
func (ResultValidationError) Error ¶
func (e ResultValidationError) Error() string
Error satisfies the builtin error interface
func (ResultValidationError) ErrorName ¶
func (e ResultValidationError) ErrorName() string
ErrorName returns error name.
func (ResultValidationError) Field ¶
func (e ResultValidationError) Field() string
Field function returns field value.
func (ResultValidationError) Key ¶
func (e ResultValidationError) Key() bool
Key function returns key value.
func (ResultValidationError) Reason ¶
func (e ResultValidationError) Reason() string
Reason function returns reason value.
type StoaClient ¶
type StoaClient interface { // QueueSize returns size of the Queue. QueueSize(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Value, error) // QueueClear cleares the Queue. QueueClear(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Empty, error) // QueueOffer offers the Value to the Queue. QueueOffer(ctx context.Context, in *Value, opts ...grpc.CallOption) (*Result, error) // QueuePoll removes and returns the head of the Queue. QueuePoll(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Value, error) // QueuePeek returns the head of the Queue. QueuePeek(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Value, error) // DictionarySize returns size of the Dictionary. DictionarySize(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Value, error) // DictionaryClear clears the Dictionary. DictionaryClear(ctx context.Context, in *Entity, opts ...grpc.CallOption) (*Empty, error) // DictionaryPutIfAbsent puts into the Dictionary the KeyValue if the key is // not present. DictionaryPutIfAbsent(ctx context.Context, in *KeyValue, opts ...grpc.CallOption) (*Result, error) // DictionaryPut puts into the Dictionary the KeyValue and returns the old // Value. DictionaryPut(ctx context.Context, in *KeyValue, opts ...grpc.CallOption) (*Value, error) // DictionaryGet returns from the Dictionary the Value specified by the Key. DictionaryGet(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Value, error) // DictionaryRemove removes from the Dictionary the key-value pair specified // by the Key. DictionaryRemove(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Result, error) // DictionaryRange returns from the Dictionary all the key-value pairs. DictionaryRange(ctx context.Context, in *Entity, opts ...grpc.CallOption) (Stoa_DictionaryRangeClient, error) // MutexTryLock tries to lock the Mutex. MutexTryLock(ctx context.Context, in *ClientId, opts ...grpc.CallOption) (*Result, error) // MutexUnlock unlocks the Mutex. MutexUnlock(ctx context.Context, in *ClientId, opts ...grpc.CallOption) (*Result, error) // Ping pings the Cluster. Ping(ctx context.Context, in *ClientId, opts ...grpc.CallOption) (*Empty, error) }
StoaClient is the client API for Stoa 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 NewStoaClient ¶
func NewStoaClient(cc grpc.ClientConnInterface) StoaClient
type StoaServer ¶
type StoaServer interface { // QueueSize returns size of the Queue. QueueSize(context.Context, *Entity) (*Value, error) // QueueClear cleares the Queue. QueueClear(context.Context, *Entity) (*Empty, error) // QueueOffer offers the Value to the Queue. QueueOffer(context.Context, *Value) (*Result, error) // QueuePoll removes and returns the head of the Queue. QueuePoll(context.Context, *Entity) (*Value, error) // QueuePeek returns the head of the Queue. QueuePeek(context.Context, *Entity) (*Value, error) // DictionarySize returns size of the Dictionary. DictionarySize(context.Context, *Entity) (*Value, error) // DictionaryClear clears the Dictionary. DictionaryClear(context.Context, *Entity) (*Empty, error) // DictionaryPutIfAbsent puts into the Dictionary the KeyValue if the key is // not present. DictionaryPutIfAbsent(context.Context, *KeyValue) (*Result, error) // DictionaryPut puts into the Dictionary the KeyValue and returns the old // Value. DictionaryPut(context.Context, *KeyValue) (*Value, error) // DictionaryGet returns from the Dictionary the Value specified by the Key. DictionaryGet(context.Context, *Key) (*Value, error) // DictionaryRemove removes from the Dictionary the key-value pair specified // by the Key. DictionaryRemove(context.Context, *Key) (*Result, error) // DictionaryRange returns from the Dictionary all the key-value pairs. DictionaryRange(*Entity, Stoa_DictionaryRangeServer) error // MutexTryLock tries to lock the Mutex. MutexTryLock(context.Context, *ClientId) (*Result, error) // MutexUnlock unlocks the Mutex. MutexUnlock(context.Context, *ClientId) (*Result, error) // Ping pings the Cluster. Ping(context.Context, *ClientId) (*Empty, error) // contains filtered or unexported methods }
StoaServer is the server API for Stoa service. All implementations must embed UnimplementedStoaServer for forward compatibility
type Stoa_DictionaryRangeClient ¶
type Stoa_DictionaryRangeClient interface { Recv() (*KeyValue, error) grpc.ClientStream }
type Stoa_DictionaryRangeServer ¶
type Stoa_DictionaryRangeServer interface { Send(*KeyValue) error grpc.ServerStream }
type UnimplementedStoaServer ¶
type UnimplementedStoaServer struct { }
UnimplementedStoaServer must be embedded to have forward compatible implementations.
func (UnimplementedStoaServer) DictionaryClear ¶
func (UnimplementedStoaServer) DictionaryGet ¶
func (UnimplementedStoaServer) DictionaryPut ¶
func (UnimplementedStoaServer) DictionaryPutIfAbsent ¶
func (UnimplementedStoaServer) DictionaryRange ¶
func (UnimplementedStoaServer) DictionaryRange(*Entity, Stoa_DictionaryRangeServer) error
func (UnimplementedStoaServer) DictionaryRemove ¶
func (UnimplementedStoaServer) DictionarySize ¶
func (UnimplementedStoaServer) MutexTryLock ¶
func (UnimplementedStoaServer) MutexUnlock ¶
func (UnimplementedStoaServer) QueueClear ¶
func (UnimplementedStoaServer) QueueOffer ¶
type UnsafeStoaServer ¶
type UnsafeStoaServer interface {
// contains filtered or unexported methods
}
UnsafeStoaServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StoaServer will result in compilation errors.
type Value ¶
type Value struct { EntityName string `protobuf:"bytes,1,opt,name=entity_name,json=entityName,proto3" json:"entity_name,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
Value contains an arbitrary data.
func (*Value) Descriptor
deprecated
func (*Value) GetEntityName ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶
func (x *Value) ProtoReflect() protoreflect.Message
type ValueValidationError ¶
type ValueValidationError struct {
// contains filtered or unexported fields
}
ValueValidationError is the validation error returned by Value.Validate if the designated constraints aren't met.
func (ValueValidationError) Cause ¶
func (e ValueValidationError) Cause() error
Cause function returns cause value.
func (ValueValidationError) Error ¶
func (e ValueValidationError) Error() string
Error satisfies the builtin error interface
func (ValueValidationError) ErrorName ¶
func (e ValueValidationError) ErrorName() string
ErrorName returns error name.
func (ValueValidationError) Field ¶
func (e ValueValidationError) Field() string
Field function returns field value.
func (ValueValidationError) Key ¶
func (e ValueValidationError) Key() bool
Key function returns key value.
func (ValueValidationError) Reason ¶
func (e ValueValidationError) Reason() string
Reason function returns reason value.