Documentation ¶
Index ¶
- Constants
- Variables
- func ConstructorOf(x interface{}) int64
- func ErrorMessage(out *MessageEnvelope, reqID uint64, errCode, errItem string)
- func SetLogLevel(l int)
- type Conn
- type EdgeNode
- func (x *EdgeNode) DeepCopy(z *EdgeNode)
- func (*EdgeNode) Descriptor() ([]byte, []int)deprecated
- func (x *EdgeNode) GetGatewayAddr() []string
- func (x *EdgeNode) GetRaftPort() uint32
- func (x *EdgeNode) GetRaftState() RaftState
- func (x *EdgeNode) GetReplicaSet() uint64
- func (x *EdgeNode) GetServerID() []byte
- func (x *EdgeNode) GetShardRangeMax() uint32
- func (x *EdgeNode) GetShardRangeMin() uint32
- func (x *EdgeNode) GetTunnelAddr() []string
- func (x *EdgeNode) Marshal() ([]byte, error)
- func (*EdgeNode) ProtoMessage()
- func (x *EdgeNode) ProtoReflect() protoreflect.Message
- func (x *EdgeNode) Reset()
- func (x *EdgeNode) String() string
- func (x *EdgeNode) Unmarshal(b []byte) error
- type Error
- func (x *Error) DeepCopy(z *Error)
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) Error() string
- func (x *Error) GetCode() string
- func (x *Error) GetItems() string
- func (x *Error) GetLocalTemplate() string
- func (x *Error) GetLocalTemplateItems() []string
- func (x *Error) GetTemplate() string
- func (x *Error) GetTemplateItems() []string
- func (x *Error) Marshal() ([]byte, error)
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- func (x *Error) Unmarshal(b []byte) error
- type GetNodes
- func (x *GetNodes) DeepCopy(z *GetNodes)
- func (*GetNodes) Descriptor() ([]byte, []int)deprecated
- func (x *GetNodes) GetReplicaSet() []uint64
- func (x *GetNodes) Marshal() ([]byte, error)
- func (*GetNodes) ProtoMessage()
- func (x *GetNodes) ProtoReflect() protoreflect.Message
- func (x *GetNodes) Reset()
- func (x *GetNodes) String() string
- func (x *GetNodes) Unmarshal(b []byte) error
- type KeyValue
- func (x *KeyValue) DeepCopy(z *KeyValue)
- func (*KeyValue) Descriptor() ([]byte, []int)deprecated
- func (x *KeyValue) GetKey() string
- func (x *KeyValue) GetValue() string
- func (x *KeyValue) Marshal() ([]byte, error)
- func (*KeyValue) ProtoMessage()
- func (x *KeyValue) ProtoReflect() protoreflect.Message
- func (x *KeyValue) Reset()
- func (x *KeyValue) String() string
- func (x *KeyValue) Unmarshal(b []byte) error
- type MessageContainer
- func (x *MessageContainer) DeepCopy(z *MessageContainer)
- func (*MessageContainer) Descriptor() ([]byte, []int)deprecated
- func (x *MessageContainer) GetEnvelopes() []*MessageEnvelope
- func (x *MessageContainer) GetLength() int32
- func (x *MessageContainer) Marshal() ([]byte, error)
- func (*MessageContainer) ProtoMessage()
- func (x *MessageContainer) ProtoReflect() protoreflect.Message
- func (x *MessageContainer) Reset()
- func (x *MessageContainer) String() string
- func (x *MessageContainer) Unmarshal(b []byte) error
- type MessageEnvelope
- func (x *MessageEnvelope) Clone() *MessageEnvelope
- func (x *MessageEnvelope) DeepCopy(z *MessageEnvelope)
- func (*MessageEnvelope) Descriptor() ([]byte, []int)deprecated
- func (x *MessageEnvelope) Fill(reqID uint64, constructor int64, p proto.Message, kvs ...*KeyValue)
- func (x *MessageEnvelope) Get(key, defaultVal string) string
- func (x *MessageEnvelope) GetAuth() []byte
- func (x *MessageEnvelope) GetConstructor() int64
- func (x *MessageEnvelope) GetHeader() []*KeyValue
- func (x *MessageEnvelope) GetMessage() []byte
- func (x *MessageEnvelope) GetRequestID() uint64
- func (x *MessageEnvelope) Marshal() ([]byte, error)
- func (*MessageEnvelope) ProtoMessage()
- func (x *MessageEnvelope) ProtoReflect() protoreflect.Message
- func (x *MessageEnvelope) Reset()
- func (x *MessageEnvelope) Set(KVs ...*KeyValue)
- func (x *MessageEnvelope) String() string
- func (x *MessageEnvelope) Unmarshal(b []byte) error
- type NodeInfo
- func (x *NodeInfo) DeepCopy(z *NodeInfo)
- func (*NodeInfo) Descriptor() ([]byte, []int)deprecated
- func (x *NodeInfo) GetHostPorts() []string
- func (x *NodeInfo) GetLeader() bool
- func (x *NodeInfo) GetReplicaSet() uint64
- func (x *NodeInfo) GetServerID() string
- func (x *NodeInfo) Marshal() ([]byte, error)
- func (*NodeInfo) ProtoMessage()
- func (x *NodeInfo) ProtoReflect() protoreflect.Message
- func (x *NodeInfo) Reset()
- func (x *NodeInfo) String() string
- func (x *NodeInfo) Unmarshal(b []byte) error
- type NodeInfoMany
- func (x *NodeInfoMany) DeepCopy(z *NodeInfoMany)
- func (*NodeInfoMany) Descriptor() ([]byte, []int)deprecated
- func (x *NodeInfoMany) GetNodes() []*NodeInfo
- func (x *NodeInfoMany) Marshal() ([]byte, error)
- func (*NodeInfoMany) ProtoMessage()
- func (x *NodeInfoMany) ProtoReflect() protoreflect.Message
- func (x *NodeInfoMany) Reset()
- func (x *NodeInfoMany) String() string
- func (x *NodeInfoMany) Unmarshal(b []byte) error
- type RaftCommand
- func (x *RaftCommand) DeepCopy(z *RaftCommand)
- func (*RaftCommand) Descriptor() ([]byte, []int)deprecated
- func (x *RaftCommand) Fill(senderID []byte, e *MessageEnvelope, kvs ...*KeyValue)
- func (x *RaftCommand) GetEnvelope() *MessageEnvelope
- func (x *RaftCommand) GetSender() []byte
- func (x *RaftCommand) GetStore() []*KeyValue
- func (x *RaftCommand) Marshal() ([]byte, error)
- func (*RaftCommand) ProtoMessage()
- func (x *RaftCommand) ProtoReflect() protoreflect.Message
- func (x *RaftCommand) Reset()
- func (x *RaftCommand) String() string
- func (x *RaftCommand) Unmarshal(b []byte) error
- type RaftState
- type Redirect
- func (x *Redirect) DeepCopy(z *Redirect)
- func (*Redirect) Descriptor() ([]byte, []int)deprecated
- func (x *Redirect) GetFollowers() []*NodeInfo
- func (x *Redirect) GetLeader() *NodeInfo
- func (x *Redirect) GetReason() RedirectReason
- func (x *Redirect) GetWaitInSec() uint32
- func (x *Redirect) Marshal() ([]byte, error)
- func (*Redirect) ProtoMessage()
- func (x *Redirect) ProtoReflect() protoreflect.Message
- func (x *Redirect) Reset()
- func (x *Redirect) String() string
- func (x *Redirect) Unmarshal(b []byte) error
- type RedirectReason
- func (RedirectReason) Descriptor() protoreflect.EnumDescriptor
- func (x RedirectReason) Enum() *RedirectReason
- func (RedirectReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x RedirectReason) Number() protoreflect.EnumNumber
- func (x RedirectReason) String() string
- func (RedirectReason) Type() protoreflect.EnumType
- type TunnelMessage
- func (x *TunnelMessage) DeepCopy(z *TunnelMessage)
- func (*TunnelMessage) Descriptor() ([]byte, []int)deprecated
- func (x *TunnelMessage) Fill(senderID []byte, senderReplicaSet uint64, e *MessageEnvelope, kvs ...*KeyValue)
- func (x *TunnelMessage) GetEnvelope() *MessageEnvelope
- func (x *TunnelMessage) GetSenderID() []byte
- func (x *TunnelMessage) GetSenderReplicaSet() uint64
- func (x *TunnelMessage) GetStore() []*KeyValue
- func (x *TunnelMessage) Marshal() ([]byte, error)
- func (*TunnelMessage) ProtoMessage()
- func (x *TunnelMessage) ProtoReflect() protoreflect.Message
- func (x *TunnelMessage) Reset()
- func (x *TunnelMessage) String() string
- func (x *TunnelMessage) Unmarshal(b []byte) error
Constants ¶
const ( ErrCodeInternal = "E00" // When Error is Unknown or it is internal and should not be exposed to the client ErrCodeInvalid = "E01" ErrCodeTooMany = "E03" ErrCodeTooFew = "E04" ErrCodeIncomplete = "E05" ErrCodeTimeout = "E06" ErrCodeAccess = "E07" ErrCodeAlreadyExists = "E08" ErrCodeBusy = "E09" ErrCodeOutOfRange = "E10" ErrCodePartiallyApplied = "E11" ErrCodeExpired = "E12" ErrCodeNotImplemented = "E13" )
Error Codes
const ( ErrItemServer = "SERVER" ErrItemRaftLeader = "RAFT_LEADER" ErrItemHandler = "HANDLER" ErrItemRequest = "REQUEST" )
Error Items
const C_EdgeNode int64 = 999040174
const C_Error int64 = 2619118453
const C_GetNodes int64 = 362407405
const C_KeyValue int64 = 4276272820
const C_MessageContainer int64 = 1972016308
const C_MessageEnvelope int64 = 535232465
const C_NodeInfo int64 = 2894317502
const C_NodeInfoMany int64 = 1963715709
const C_RaftCommand int64 = 2919813429
const C_Redirect int64 = 981138557
const C_TunnelMessage int64 = 3271476222
Variables ¶
var ( ErrGatewayAlreadyInitialized = errors.New("gateway already initialized") ErrNotFound = errors.New("not found") ErrNotRaftLeader = errors.New("not raft leader") ErrRaftAlreadyJoined = errors.New("raft already joined") ErrRaftNotSet = errors.New("raft not set") ErrRaftExecuteOnLeader = errors.New("raft execute on leader") ErrRetriesExceeded = wrapError("maximum retries exceeded") )
Errors
var ( RaftState_name = map[int32]string{ 0: "None", 1: "Follower", 2: "Candidate", 3: "Leader", 4: "Shutdown", } RaftState_value = map[string]int32{ "None": 0, "Follower": 1, "Candidate": 2, "Leader": 3, "Shutdown": 4, } )
Enum value maps for RaftState.
var ( RedirectReason_name = map[int32]string{ 0: "ReplicaMaster", 1: "ReplicaSetSession", 2: "ReplicaSetRequest", 3: "Reserved1", 4: "Reserved2", 5: "Reserved3", 6: "Reserved4", } RedirectReason_value = map[string]int32{ "ReplicaMaster": 0, "ReplicaSetSession": 1, "ReplicaSetRequest": 2, "Reserved1": 3, "Reserved2": 4, "Reserved3": 5, "Reserved4": 6, } )
Enum value maps for RedirectReason.
var ( // rony_cobra_cmd generates the boiler plate code for client stub of rpc methods, using cobra package. // // optional bool rony_cobra_cmd = 50001; E_RonyCobraCmd = &file_options_proto_extTypes[1] // rony_cobra_cmd_protocol defines what protocol should client use to communicate with server. // POSSIBLE VALUES: "ws", "http" // // optional string rony_cobra_cmd_protocol = 50002; E_RonyCobraCmdProtocol = &file_options_proto_extTypes[2] )
Extension fields to descriptorpb.ServiceOptions.
var ( // rony_inconsistent_read marks this method that it could be called on nodes with FOLLOWER state. Otherwise methods could only // be executed on LEADER nodes. // // optional bool rony_inconsistent_read = 50001; E_RonyInconsistentRead = &file_options_proto_extTypes[3] // rony_internal marks this method internal, hence only edges could execute this rpc through tunnel messages. In other words, // this command is not exposed to external clients connected through th gateway. // // optional bool rony_internal = 50002; E_RonyInternal = &file_options_proto_extTypes[4] )
Extension fields to descriptorpb.MethodOptions.
var ( // rony_aggregate marks this message as an aggregate, then 'rony_table' and 'rony_view' options become available for this // message. // // optional bool rony_aggregate = 50001; E_RonyAggregate = &file_options_proto_extTypes[5] // rony_singleton marks this message as a singleton. // NOTE: a message could either have 'rony_aggregate' ro 'rony_singleton' options at a same time. Setting both // cause unpredictable results. // // optional bool rony_singleton = 50002; E_RonySingleton = &file_options_proto_extTypes[6] // rony_aggregate_type makes the code generator to generate appropriate functions based on the way you are going // to handle actions on the aggregate. // POSSIBLE_VALUES: "crud", "eventsource" // // optional string rony_aggregate_type = 50010; E_RonyAggregateType = &file_options_proto_extTypes[7] // rony_aggregate_command makes this message as a command which is ONLY used if rony_aggregate_type is set to 'eventsource'. // If this option is set then you MUST also define rony_aggregate_link to identify which aggregate this command will work on. // // optional bool rony_aggregate_command = 50011; E_RonyAggregateCommand = &file_options_proto_extTypes[8] // rony_aggregate_event makes this message as an event which is ONLY used if rony_aggregate_type is set to 'eventsource' // If this option is set then you MUST also define rony_aggregate_link to identify which aggregate this event will be read from. // // optional bool rony_aggregate_event = 50012; E_RonyAggregateEvent = &file_options_proto_extTypes[9] // rony_aggregate_link is the name of the aggregate message which we link this message to. // // optional string rony_aggregate_link = 50013; E_RonyAggregateLink = &file_options_proto_extTypes[10] // rony_aggregate_table creates a virtual table presentation to hold instances of this message, like rows in a table // PRIMARY KEY FORMAT: ( (partitionKey1, partitionKey2, ...), clusteringKey1, clusteringKey2, ...) // NOTE: If there is only one partition key then you could safely drop the parenthesis, i.e. (pk1, ck1, ck2) // // optional string rony_aggregate_table = 50014; E_RonyAggregateTable = &file_options_proto_extTypes[11] // rony_aggregate_view creates a materialized view of the aggregate based on the primary key. // PRIMARY KEY FORMAT: ( (partitionKey1, partitionKey2, ...), clusteringKey1, clusteringKey2, ...) // NOTE (1): If there is only one partition key then you could safely drop the parenthesis, i.e. (pk1, ck1, ck2) // NOTE (2): The primary key of the model must contains all the primary key items of the table. They don't need to // follow the same order as table. for example the following is correct: // rony_aggregate_table = ((a, b), c) // rony_aggregate_view = ((c, a), d, b) // // optional string rony_aggregate_view = 50015; E_RonyAggregateView = &file_options_proto_extTypes[12] )
Extension fields to descriptorpb.MessageOptions.
var (
// optional bool rony_index = 50001;
E_RonyIndex = &file_options_proto_extTypes[13]
)
Extension fields to descriptorpb.FieldOptions.
var ( // rony_repo defines what kind of rony repos will be used for messages with 'rony_model' or 'rony_singleton' options enabled. // POSSIBLE VALUES: "local", "cql" // // optional string rony_repo = 50001; E_RonyRepo = &file_options_proto_extTypes[0] )
Extension fields to descriptorpb.FileOptions.
var File_imsg_proto protoreflect.FileDescriptor
var File_msg_proto protoreflect.FileDescriptor
var File_options_proto protoreflect.FileDescriptor
var PoolEdgeNode = poolEdgeNode{}
var PoolError = poolError{}
var PoolGetNodes = poolGetNodes{}
var PoolKeyValue = poolKeyValue{}
var PoolMessageContainer = poolMessageContainer{}
var PoolMessageEnvelope = poolMessageEnvelope{}
var PoolNodeInfo = poolNodeInfo{}
var PoolNodeInfoMany = poolNodeInfoMany{}
var PoolRaftCommand = poolRaftCommand{}
var PoolRedirect = poolRedirect{}
var PoolTunnelMessage = poolTunnelMessage{}
Functions ¶
func ConstructorOf ¶
func ConstructorOf(x interface{}) int64
func ErrorMessage ¶
func ErrorMessage(out *MessageEnvelope, reqID uint64, errCode, errItem string)
func SetLogLevel ¶
func SetLogLevel(l int)
SetLogLevel is used for debugging purpose -1 : DEBUG 0 : INFO 1 : WARN 2 : ERROR
Types ¶
type Conn ¶ added in v0.1.9
type Conn interface { ConnID() uint64 ClientIP() string SendBinary(streamID int64, data []byte) error Persistent() bool Get(key string) interface{} Set(key string, val interface{}) }
Conn defines the Connection interface
type EdgeNode ¶
type EdgeNode struct { ServerID []byte `protobuf:"bytes,1,opt,name=ServerID,proto3" json:"ServerID,omitempty"` ReplicaSet uint64 `protobuf:"varint,2,opt,name=ReplicaSet,proto3" json:"ReplicaSet,omitempty"` ShardRangeMin uint32 `protobuf:"varint,3,opt,name=ShardRangeMin,proto3" json:"ShardRangeMin,omitempty"` ShardRangeMax uint32 `protobuf:"varint,4,opt,name=ShardRangeMax,proto3" json:"ShardRangeMax,omitempty"` RaftPort uint32 `protobuf:"varint,5,opt,name=RaftPort,proto3" json:"RaftPort,omitempty"` RaftState RaftState `protobuf:"varint,6,opt,name=RaftState,proto3,enum=rony.RaftState" json:"RaftState,omitempty"` GatewayAddr []string `protobuf:"bytes,7,rep,name=GatewayAddr,proto3" json:"GatewayAddr,omitempty"` TunnelAddr []string `protobuf:"bytes,8,rep,name=TunnelAddr,proto3" json:"TunnelAddr,omitempty"` // contains filtered or unexported fields }
EdgeNode
func (*EdgeNode) Descriptor
deprecated
func (*EdgeNode) GetGatewayAddr ¶
func (*EdgeNode) GetRaftPort ¶
func (*EdgeNode) GetRaftState ¶
func (*EdgeNode) GetReplicaSet ¶
func (*EdgeNode) GetServerID ¶
func (*EdgeNode) GetShardRangeMax ¶
func (*EdgeNode) GetShardRangeMin ¶
func (*EdgeNode) GetTunnelAddr ¶ added in v0.1.8
func (*EdgeNode) ProtoMessage ¶
func (*EdgeNode) ProtoMessage()
func (*EdgeNode) ProtoReflect ¶
func (x *EdgeNode) ProtoReflect() protoreflect.Message
type Error ¶
type Error struct { Code string `protobuf:"bytes,1,opt,name=Code,proto3" json:"Code,omitempty"` Items string `protobuf:"bytes,2,opt,name=Items,proto3" json:"Items,omitempty"` Template string `protobuf:"bytes,3,opt,name=Template,proto3" json:"Template,omitempty"` TemplateItems []string `protobuf:"bytes,4,rep,name=TemplateItems,proto3" json:"TemplateItems,omitempty"` LocalTemplate string `protobuf:"bytes,5,opt,name=LocalTemplate,proto3" json:"LocalTemplate,omitempty"` LocalTemplateItems []string `protobuf:"bytes,6,rep,name=LocalTemplateItems,proto3" json:"LocalTemplateItems,omitempty"` // contains filtered or unexported fields }
Error
func (*Error) Descriptor
deprecated
func (*Error) GetLocalTemplate ¶
func (*Error) GetLocalTemplateItems ¶
func (*Error) GetTemplate ¶
func (*Error) GetTemplateItems ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type GetNodes ¶ added in v0.1.5
type GetNodes struct { ReplicaSet []uint64 `protobuf:"varint,1,rep,packed,name=ReplicaSet,proto3" json:"ReplicaSet,omitempty"` // contains filtered or unexported fields }
GetNodes @Returns: NodeInfoMany
func (*GetNodes) Descriptor
deprecated
added in
v0.1.5
func (*GetNodes) GetReplicaSet ¶ added in v0.1.5
func (*GetNodes) ProtoMessage ¶ added in v0.1.5
func (*GetNodes) ProtoMessage()
func (*GetNodes) ProtoReflect ¶ added in v0.1.5
func (x *GetNodes) ProtoReflect() protoreflect.Message
type KeyValue ¶
type KeyValue struct { Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` Value string `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` // contains filtered or unexported fields }
KeyValue
func (*KeyValue) Descriptor
deprecated
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
func (*KeyValue) ProtoReflect ¶
func (x *KeyValue) ProtoReflect() protoreflect.Message
type MessageContainer ¶
type MessageContainer struct { Length int32 `protobuf:"varint,1,opt,name=Length,proto3" json:"Length,omitempty"` Envelopes []*MessageEnvelope `protobuf:"bytes,2,rep,name=Envelopes,proto3" json:"Envelopes,omitempty"` // contains filtered or unexported fields }
MessageContainer This type of message will be used to send multi messages inside a single container message
func (*MessageContainer) DeepCopy ¶
func (x *MessageContainer) DeepCopy(z *MessageContainer)
func (*MessageContainer) Descriptor
deprecated
func (*MessageContainer) Descriptor() ([]byte, []int)
Deprecated: Use MessageContainer.ProtoReflect.Descriptor instead.
func (*MessageContainer) GetEnvelopes ¶
func (x *MessageContainer) GetEnvelopes() []*MessageEnvelope
func (*MessageContainer) GetLength ¶
func (x *MessageContainer) GetLength() int32
func (*MessageContainer) Marshal ¶ added in v0.0.17
func (x *MessageContainer) Marshal() ([]byte, error)
func (*MessageContainer) ProtoMessage ¶
func (*MessageContainer) ProtoMessage()
func (*MessageContainer) ProtoReflect ¶
func (x *MessageContainer) ProtoReflect() protoreflect.Message
func (*MessageContainer) Reset ¶
func (x *MessageContainer) Reset()
func (*MessageContainer) String ¶
func (x *MessageContainer) String() string
func (*MessageContainer) Unmarshal ¶
func (x *MessageContainer) Unmarshal(b []byte) error
type MessageEnvelope ¶
type MessageEnvelope struct { Constructor int64 `protobuf:"varint,1,opt,name=Constructor,proto3" json:"Constructor,omitempty"` RequestID uint64 `protobuf:"fixed64,2,opt,name=RequestID,proto3" json:"RequestID,omitempty"` Message []byte `protobuf:"bytes,4,opt,name=Message,proto3" json:"Message,omitempty"` Auth []byte `protobuf:"bytes,8,opt,name=Auth,proto3" json:"Auth,omitempty"` Header []*KeyValue `protobuf:"bytes,10,rep,name=Header,proto3" json:"Header,omitempty"` // contains filtered or unexported fields }
MessageEnvelope This type of message will be used to contain another ProtoBuffer Message inside
func (*MessageEnvelope) Clone ¶
func (x *MessageEnvelope) Clone() *MessageEnvelope
func (*MessageEnvelope) DeepCopy ¶
func (x *MessageEnvelope) DeepCopy(z *MessageEnvelope)
func (*MessageEnvelope) Descriptor
deprecated
func (*MessageEnvelope) Descriptor() ([]byte, []int)
Deprecated: Use MessageEnvelope.ProtoReflect.Descriptor instead.
func (*MessageEnvelope) Get ¶ added in v0.0.18
func (x *MessageEnvelope) Get(key, defaultVal string) string
func (*MessageEnvelope) GetAuth ¶
func (x *MessageEnvelope) GetAuth() []byte
func (*MessageEnvelope) GetConstructor ¶
func (x *MessageEnvelope) GetConstructor() int64
func (*MessageEnvelope) GetHeader ¶
func (x *MessageEnvelope) GetHeader() []*KeyValue
func (*MessageEnvelope) GetMessage ¶
func (x *MessageEnvelope) GetMessage() []byte
func (*MessageEnvelope) GetRequestID ¶
func (x *MessageEnvelope) GetRequestID() uint64
func (*MessageEnvelope) Marshal ¶ added in v0.0.17
func (x *MessageEnvelope) Marshal() ([]byte, error)
func (*MessageEnvelope) ProtoMessage ¶
func (*MessageEnvelope) ProtoMessage()
func (*MessageEnvelope) ProtoReflect ¶
func (x *MessageEnvelope) ProtoReflect() protoreflect.Message
func (*MessageEnvelope) Reset ¶
func (x *MessageEnvelope) Reset()
func (*MessageEnvelope) Set ¶ added in v0.0.18
func (x *MessageEnvelope) Set(KVs ...*KeyValue)
func (*MessageEnvelope) String ¶
func (x *MessageEnvelope) String() string
func (*MessageEnvelope) Unmarshal ¶
func (x *MessageEnvelope) Unmarshal(b []byte) error
type NodeInfo ¶ added in v0.1.5
type NodeInfo struct { ReplicaSet uint64 `protobuf:"varint,1,opt,name=ReplicaSet,proto3" json:"ReplicaSet,omitempty"` ServerID string `protobuf:"bytes,2,opt,name=ServerID,proto3" json:"ServerID,omitempty"` HostPorts []string `protobuf:"bytes,3,rep,name=HostPorts,proto3" json:"HostPorts,omitempty"` Leader bool `protobuf:"varint,4,opt,name=Leader,proto3" json:"Leader,omitempty"` // contains filtered or unexported fields }
NodeInfo
func (*NodeInfo) Descriptor
deprecated
added in
v0.1.5
func (*NodeInfo) GetHostPorts ¶ added in v0.1.5
func (*NodeInfo) GetReplicaSet ¶ added in v0.1.5
func (*NodeInfo) GetServerID ¶ added in v0.1.5
func (*NodeInfo) ProtoMessage ¶ added in v0.1.5
func (*NodeInfo) ProtoMessage()
func (*NodeInfo) ProtoReflect ¶ added in v0.1.5
func (x *NodeInfo) ProtoReflect() protoreflect.Message
type NodeInfoMany ¶ added in v0.1.5
type NodeInfoMany struct { Nodes []*NodeInfo `protobuf:"bytes,1,rep,name=Nodes,proto3" json:"Nodes,omitempty"` // contains filtered or unexported fields }
NodeInfoMany
func (*NodeInfoMany) DeepCopy ¶ added in v0.1.5
func (x *NodeInfoMany) DeepCopy(z *NodeInfoMany)
func (*NodeInfoMany) Descriptor
deprecated
added in
v0.1.5
func (*NodeInfoMany) Descriptor() ([]byte, []int)
Deprecated: Use NodeInfoMany.ProtoReflect.Descriptor instead.
func (*NodeInfoMany) GetNodes ¶ added in v0.1.5
func (x *NodeInfoMany) GetNodes() []*NodeInfo
func (*NodeInfoMany) Marshal ¶ added in v0.1.5
func (x *NodeInfoMany) Marshal() ([]byte, error)
func (*NodeInfoMany) ProtoMessage ¶ added in v0.1.5
func (*NodeInfoMany) ProtoMessage()
func (*NodeInfoMany) ProtoReflect ¶ added in v0.1.5
func (x *NodeInfoMany) ProtoReflect() protoreflect.Message
func (*NodeInfoMany) Reset ¶ added in v0.1.5
func (x *NodeInfoMany) Reset()
func (*NodeInfoMany) String ¶ added in v0.1.5
func (x *NodeInfoMany) String() string
func (*NodeInfoMany) Unmarshal ¶ added in v0.1.5
func (x *NodeInfoMany) Unmarshal(b []byte) error
type RaftCommand ¶
type RaftCommand struct { Sender []byte `protobuf:"bytes,1,opt,name=Sender,proto3" json:"Sender,omitempty"` Store []*KeyValue `protobuf:"bytes,2,rep,name=Store,proto3" json:"Store,omitempty"` Envelope *MessageEnvelope `protobuf:"bytes,3,opt,name=Envelope,proto3" json:"Envelope,omitempty"` // contains filtered or unexported fields }
RaftCommand
func (*RaftCommand) DeepCopy ¶
func (x *RaftCommand) DeepCopy(z *RaftCommand)
func (*RaftCommand) Descriptor
deprecated
func (*RaftCommand) Descriptor() ([]byte, []int)
Deprecated: Use RaftCommand.ProtoReflect.Descriptor instead.
func (*RaftCommand) Fill ¶
func (x *RaftCommand) Fill(senderID []byte, e *MessageEnvelope, kvs ...*KeyValue)
func (*RaftCommand) GetEnvelope ¶
func (x *RaftCommand) GetEnvelope() *MessageEnvelope
func (*RaftCommand) GetSender ¶
func (x *RaftCommand) GetSender() []byte
func (*RaftCommand) GetStore ¶
func (x *RaftCommand) GetStore() []*KeyValue
func (*RaftCommand) Marshal ¶ added in v0.0.17
func (x *RaftCommand) Marshal() ([]byte, error)
func (*RaftCommand) ProtoMessage ¶
func (*RaftCommand) ProtoMessage()
func (*RaftCommand) ProtoReflect ¶
func (x *RaftCommand) ProtoReflect() protoreflect.Message
func (*RaftCommand) Reset ¶
func (x *RaftCommand) Reset()
func (*RaftCommand) String ¶
func (x *RaftCommand) String() string
func (*RaftCommand) Unmarshal ¶
func (x *RaftCommand) Unmarshal(b []byte) error
type RaftState ¶
type RaftState int32
RaftState
func (RaftState) Descriptor ¶
func (RaftState) Descriptor() protoreflect.EnumDescriptor
func (RaftState) EnumDescriptor
deprecated
func (RaftState) Number ¶
func (x RaftState) Number() protoreflect.EnumNumber
func (RaftState) Type ¶
func (RaftState) Type() protoreflect.EnumType
type Redirect ¶
type Redirect struct { Reason RedirectReason `protobuf:"varint,100,opt,name=Reason,proto3,enum=rony.RedirectReason" json:"Reason,omitempty"` Leader *NodeInfo `protobuf:"bytes,1,opt,name=Leader,proto3" json:"Leader,omitempty"` Followers []*NodeInfo `protobuf:"bytes,2,rep,name=Followers,proto3" json:"Followers,omitempty"` WaitInSec uint32 `protobuf:"varint,3,opt,name=WaitInSec,proto3" json:"WaitInSec,omitempty"` // contains filtered or unexported fields }
Redirect
func (*Redirect) Descriptor
deprecated
func (*Redirect) GetFollowers ¶ added in v0.1.5
func (*Redirect) GetReason ¶ added in v0.1.5
func (x *Redirect) GetReason() RedirectReason
func (*Redirect) GetWaitInSec ¶
func (*Redirect) ProtoMessage ¶
func (*Redirect) ProtoMessage()
func (*Redirect) ProtoReflect ¶
func (x *Redirect) ProtoReflect() protoreflect.Message
type RedirectReason ¶ added in v0.1.5
type RedirectReason int32
RedirectReason
const ( RedirectReason_ReplicaMaster RedirectReason = 0 RedirectReason_ReplicaSetSession RedirectReason = 1 RedirectReason_ReplicaSetRequest RedirectReason = 2 RedirectReason_Reserved1 RedirectReason = 3 RedirectReason_Reserved2 RedirectReason = 4 RedirectReason_Reserved3 RedirectReason = 5 RedirectReason_Reserved4 RedirectReason = 6 )
func (RedirectReason) Descriptor ¶ added in v0.1.5
func (RedirectReason) Descriptor() protoreflect.EnumDescriptor
func (RedirectReason) Enum ¶ added in v0.1.5
func (x RedirectReason) Enum() *RedirectReason
func (RedirectReason) EnumDescriptor
deprecated
added in
v0.1.5
func (RedirectReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use RedirectReason.Descriptor instead.
func (RedirectReason) Number ¶ added in v0.1.5
func (x RedirectReason) Number() protoreflect.EnumNumber
func (RedirectReason) String ¶ added in v0.1.5
func (x RedirectReason) String() string
func (RedirectReason) Type ¶ added in v0.1.5
func (RedirectReason) Type() protoreflect.EnumType
type TunnelMessage ¶ added in v0.1.8
type TunnelMessage struct { SenderID []byte `protobuf:"bytes,1,opt,name=SenderID,proto3" json:"SenderID,omitempty"` SenderReplicaSet uint64 `protobuf:"varint,2,opt,name=SenderReplicaSet,proto3" json:"SenderReplicaSet,omitempty"` Store []*KeyValue `protobuf:"bytes,3,rep,name=Store,proto3" json:"Store,omitempty"` Envelope *MessageEnvelope `protobuf:"bytes,4,opt,name=Envelope,proto3" json:"Envelope,omitempty"` // contains filtered or unexported fields }
TunnelMessage
func (*TunnelMessage) DeepCopy ¶ added in v0.1.8
func (x *TunnelMessage) DeepCopy(z *TunnelMessage)
func (*TunnelMessage) Descriptor
deprecated
added in
v0.1.8
func (*TunnelMessage) Descriptor() ([]byte, []int)
Deprecated: Use TunnelMessage.ProtoReflect.Descriptor instead.
func (*TunnelMessage) Fill ¶ added in v0.1.8
func (x *TunnelMessage) Fill(senderID []byte, senderReplicaSet uint64, e *MessageEnvelope, kvs ...*KeyValue)
func (*TunnelMessage) GetEnvelope ¶ added in v0.1.8
func (x *TunnelMessage) GetEnvelope() *MessageEnvelope
func (*TunnelMessage) GetSenderID ¶ added in v0.1.8
func (x *TunnelMessage) GetSenderID() []byte
func (*TunnelMessage) GetSenderReplicaSet ¶ added in v0.1.8
func (x *TunnelMessage) GetSenderReplicaSet() uint64
func (*TunnelMessage) GetStore ¶ added in v0.1.8
func (x *TunnelMessage) GetStore() []*KeyValue
func (*TunnelMessage) Marshal ¶ added in v0.1.8
func (x *TunnelMessage) Marshal() ([]byte, error)
func (*TunnelMessage) ProtoMessage ¶ added in v0.1.8
func (*TunnelMessage) ProtoMessage()
func (*TunnelMessage) ProtoReflect ¶ added in v0.1.8
func (x *TunnelMessage) ProtoReflect() protoreflect.Message
func (*TunnelMessage) Reset ¶ added in v0.1.8
func (x *TunnelMessage) Reset()
func (*TunnelMessage) String ¶ added in v0.1.8
func (x *TunnelMessage) String() string
func (*TunnelMessage) Unmarshal ¶ added in v0.1.8
func (x *TunnelMessage) Unmarshal(b []byte) error
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
tcp/util
Package wsutil provides utilities for working with WebSocket protocol.
|
Package wsutil provides utilities for working with WebSocket protocol. |
internal
|
|
parser
Package parse builds parse trees for templates as defined by text/template and html/template.
|
Package parse builds parse trees for templates as defined by text/template and html/template. |
repo
|
|