Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPrometheus(registerer prometheus.Registerer)
- func SetLogLevel(l LogLevel)
- type CliOpt
- type Cluster
- type ClusterDelegate
- type ClusterMember
- type Conn
- type Edge
- func (x *Edge) Clone() *Edge
- func (x *Edge) DeepCopy(z *Edge)
- func (*Edge) Descriptor() ([]byte, []int)deprecated
- func (x *Edge) GetHostPorts() []string
- func (x *Edge) GetReplicaSet() uint64
- func (x *Edge) GetServerID() string
- func (x *Edge) Marshal() ([]byte, error)
- func (x *Edge) MarshalJSON() ([]byte, error)
- func (*Edge) ProtoMessage()
- func (x *Edge) ProtoReflect() protoreflect.Message
- func (x *Edge) Reset()
- func (x *Edge) String() string
- func (x *Edge) Unmarshal(b []byte) error
- func (x *Edge) UnmarshalJSON(b []byte) error
- type Edges
- func (x *Edges) Clone() *Edges
- func (x *Edges) DeepCopy(z *Edges)
- func (*Edges) Descriptor() ([]byte, []int)deprecated
- func (x *Edges) GetNodes() []*Edge
- func (x *Edges) Marshal() ([]byte, error)
- func (x *Edges) MarshalJSON() ([]byte, error)
- func (*Edges) ProtoMessage()
- func (x *Edges) ProtoReflect() protoreflect.Message
- func (x *Edges) Reset()
- func (x *Edges) String() string
- func (x *Edges) Unmarshal(b []byte) error
- func (x *Edges) UnmarshalJSON(b []byte) error
- type Error
- func (x *Error) Clone() *Error
- func (x *Error) DeepCopy(z *Error)
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) Error() string
- func (x *Error) Expand() (string, string)
- func (x *Error) GetCode() string
- func (x *Error) GetDescription() string
- func (x *Error) GetItems() string
- func (x *Error) Marshal() ([]byte, error)
- func (x *Error) MarshalJSON() ([]byte, error)
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- func (x *Error) ToEnvelope(me *MessageEnvelope)
- func (x *Error) Unmarshal(b []byte) error
- func (x *Error) UnmarshalJSON(b []byte) error
- type Gateway
- type GatewayDelegate
- type GatewayProtocol
- type GetAllNodes
- func (x *GetAllNodes) Clone() *GetAllNodes
- func (x *GetAllNodes) DeepCopy(z *GetAllNodes)
- func (*GetAllNodes) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllNodes) Marshal() ([]byte, error)
- func (x *GetAllNodes) MarshalJSON() ([]byte, error)
- func (*GetAllNodes) ProtoMessage()
- func (x *GetAllNodes) ProtoReflect() protoreflect.Message
- func (x *GetAllNodes) Reset()
- func (x *GetAllNodes) String() string
- func (x *GetAllNodes) Unmarshal(b []byte) error
- func (x *GetAllNodes) UnmarshalJSON(b []byte) error
- type GetNodes
- func (x *GetNodes) Clone() *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 (x *GetNodes) MarshalJSON() ([]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
- func (x *GetNodes) UnmarshalJSON(b []byte) error
- type HttpBody
- func (x *HttpBody) Clone() *HttpBody
- func (x *HttpBody) DeepCopy(z *HttpBody)
- func (*HttpBody) Descriptor() ([]byte, []int)deprecated
- func (x *HttpBody) GetBody() []byte
- func (x *HttpBody) GetContentType() string
- func (x *HttpBody) GetHeader() []*KeyValue
- func (x *HttpBody) Marshal() ([]byte, error)
- func (x *HttpBody) MarshalJSON() ([]byte, error)
- func (*HttpBody) ProtoMessage()
- func (x *HttpBody) ProtoReflect() protoreflect.Message
- func (x *HttpBody) Reset()
- func (x *HttpBody) String() string
- func (x *HttpBody) Unmarshal(b []byte) error
- func (x *HttpBody) UnmarshalJSON(b []byte) error
- type KeyValue
- func (x *KeyValue) Clone() *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 (x *KeyValue) MarshalJSON() ([]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
- func (x *KeyValue) UnmarshalJSON(b []byte) error
- type LocalDB
- type LogLevel
- type MessageContainer
- func (x *MessageContainer) Add(reqID uint64, constructor uint64, p proto.Message, kvs ...*KeyValue)
- func (x *MessageContainer) Clone() *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) GetSyncRun() bool
- func (x *MessageContainer) Marshal() ([]byte, error)
- func (x *MessageContainer) MarshalJSON() ([]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
- func (x *MessageContainer) UnmarshalJSON(b []byte) error
- type MessageEnvelope
- func (x *MessageEnvelope) Append(key, val string)
- func (x *MessageEnvelope) Carrier() *envelopeCarrier
- func (x *MessageEnvelope) Clone() *MessageEnvelope
- func (x *MessageEnvelope) DeepCopy(z *MessageEnvelope)
- func (*MessageEnvelope) Descriptor() ([]byte, []int)deprecated
- func (x *MessageEnvelope) Fill(reqID uint64, constructor uint64, p proto.Message, kvs ...*KeyValue)
- func (x *MessageEnvelope) Get(key, defaultVal string) string
- func (x *MessageEnvelope) GetAuth() []byte
- func (x *MessageEnvelope) GetConstructor() uint64
- func (x *MessageEnvelope) GetHeader() []*KeyValue
- func (x *MessageEnvelope) GetMessage() []byte
- func (x *MessageEnvelope) GetRequestID() uint64
- func (x *MessageEnvelope) Marshal() ([]byte, error)
- func (x *MessageEnvelope) MarshalJSON() ([]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
- func (x *MessageEnvelope) UnmarshalJSON(b []byte) error
- func (x *MessageEnvelope) Unwrap() (protoreflect.Message, error)
- type ModelOpt
- func (*ModelOpt) Descriptor() ([]byte, []int)deprecated
- func (x *ModelOpt) GetGlobalDatasource() string
- func (x *ModelOpt) GetLocalDatasource() string
- func (x *ModelOpt) GetSingleton() bool
- func (x *ModelOpt) GetTable() *PrimaryKeyOpt
- func (x *ModelOpt) GetView() []*PrimaryKeyOpt
- func (*ModelOpt) ProtoMessage()
- func (x *ModelOpt) ProtoReflect() protoreflect.Message
- func (x *ModelOpt) Reset()
- func (x *ModelOpt) String() string
- type Ping
- func (x *Ping) Clone() *Ping
- func (x *Ping) DeepCopy(z *Ping)
- func (*Ping) Descriptor() ([]byte, []int)deprecated
- func (x *Ping) GetID() int64
- func (x *Ping) Marshal() ([]byte, error)
- func (x *Ping) MarshalJSON() ([]byte, error)
- func (*Ping) ProtoMessage()
- func (x *Ping) ProtoReflect() protoreflect.Message
- func (x *Ping) Reset()
- func (x *Ping) String() string
- func (x *Ping) Unmarshal(b []byte) error
- func (x *Ping) UnmarshalJSON(b []byte) error
- type Pong
- func (x *Pong) Clone() *Pong
- func (x *Pong) DeepCopy(z *Pong)
- func (*Pong) Descriptor() ([]byte, []int)deprecated
- func (x *Pong) GetID() int64
- func (x *Pong) Marshal() ([]byte, error)
- func (x *Pong) MarshalJSON() ([]byte, error)
- func (*Pong) ProtoMessage()
- func (x *Pong) ProtoReflect() protoreflect.Message
- func (x *Pong) Reset()
- func (x *Pong) String() string
- func (x *Pong) Unmarshal(b []byte) error
- func (x *Pong) UnmarshalJSON(b []byte) error
- type PrimaryKeyOpt
- func (*PrimaryKeyOpt) Descriptor() ([]byte, []int)deprecated
- func (x *PrimaryKeyOpt) GetAlias() string
- func (x *PrimaryKeyOpt) GetPartKey() []string
- func (x *PrimaryKeyOpt) GetSortKey() []string
- func (*PrimaryKeyOpt) ProtoMessage()
- func (x *PrimaryKeyOpt) ProtoReflect() protoreflect.Message
- func (x *PrimaryKeyOpt) Reset()
- func (x *PrimaryKeyOpt) String() string
- type Redirect
- func (x *Redirect) Clone() *Redirect
- func (x *Redirect) DeepCopy(z *Redirect)
- func (*Redirect) Descriptor() ([]byte, []int)deprecated
- func (x *Redirect) GetEdges() []*Edge
- func (x *Redirect) GetReason() RedirectReason
- func (x *Redirect) GetWaitInSec() uint32
- func (x *Redirect) Marshal() ([]byte, error)
- func (x *Redirect) MarshalJSON() ([]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
- func (x *Redirect) UnmarshalJSON(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 RestConn
- type RestOpt
- func (*RestOpt) Descriptor() ([]byte, []int)deprecated
- func (x *RestOpt) GetBindPathParam() []string
- func (x *RestOpt) GetBindQueryParam() []string
- func (x *RestOpt) GetJsonEncode() bool
- func (x *RestOpt) GetMethod() string
- func (x *RestOpt) GetPath() string
- func (*RestOpt) ProtoMessage()
- func (x *RestOpt) ProtoReflect() protoreflect.Message
- func (x *RestOpt) Reset()
- func (x *RestOpt) String() string
- type Router
- type StoreTxn
- type Tunnel
Constants ¶
const ( MethodWild = "*" MethodGet = "GET" // RFC 7231, 4.3.1 MethodHead = "HEAD" // RFC 7231, 4.3.2 MethodPost = "POST" // RFC 7231, 4.3.3 MethodPut = "PUT" // RFC 7231, 4.3.4 MethodPatch = "PATCH" // RFC 5789 MethodDelete = "DELETE" // RFC 7231, 4.3.5 MethodConnect = "CONNECT" // RFC 7231, 4.3.6 MethodOptions = "OPTIONS" // RFC 7231, 4.3.7 MethodTrace = "TRACE" // RFC 7231, 4.3.8 )
HTTP methods were copied from net/http.
const C_Edge uint64 = 3661905149145645056
const C_Edges uint64 = 3202852853167161344
const C_Error uint64 = 3300063058275074048
const C_GetAllNodes uint64 = 2426091802953969362
const C_GetNodes uint64 = 17614373553603896039
const C_HttpBody uint64 = 4148778432730789982
const C_KeyValue uint64 = 9712539143259722476
const C_MessageContainer uint64 = 8705479839606992738
const C_MessageEnvelope uint64 = 11385363697628734430
const C_Ping uint64 = 3584172304239689728
const C_Pong uint64 = 3584174915579805696
const C_Redirect uint64 = 12783312295490183931
Variables ¶
var ( RedirectReason_name = map[int32]string{ 0: "ReplicaSetSession", 1: "ReplicaSetRequest", 3: "Reserved1", 4: "Reserved2", 5: "Reserved3", 6: "Reserved4", } RedirectReason_value = map[string]int32{ "ReplicaSetSession": 0, "ReplicaSetRequest": 1, "Reserved1": 3, "Reserved2": 4, "Reserved3": 5, "Reserved4": 6, } )
Enum value maps for RedirectReason.
var ( // rony_cli generates the boiler plate code for client stub of rpc methods. // // optional CliOpt rony_cli = 50001; E_RonyCli = &file_options_proto_extTypes[0] // rony_no_client if is set then no client code will be generated. This flag is for internal usage. // DO NOT USE IT. // // optional bool rony_no_client = 50003; E_RonyNoClient = &file_options_proto_extTypes[1] )
Extension fields to descriptorpb.ServiceOptions.
var ( // 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[2] // optional RestOpt rony_rest = 50003; E_RonyRest = &file_options_proto_extTypes[3] )
Extension fields to descriptorpb.MethodOptions.
var ( // optional ModelOpt rony_model = 50001; E_RonyModel = &file_options_proto_extTypes[4] // optional bool rony_is_envelope = 50031; E_RonyIsEnvelope = &file_options_proto_extTypes[5] )
Extension fields to descriptorpb.MessageOptions.
var ( // rony_index marks this field as an indexed field. Some queries will be generated for this indexed field. // // optional bool rony_index = 50001; E_RonyIndex = &file_options_proto_extTypes[6] // rony_default set the help text in generated cli client. This flag only works if rony_cobra_cmd is set // in the service. // // optional string rony_help = 50002; E_RonyHelp = &file_options_proto_extTypes[7] // rony_default set the default value in generated cli client. This flag only works if rony_cobra_cmd is set // in the service. // // optional string rony_default = 50003; E_RonyDefault = &file_options_proto_extTypes[8] )
Extension fields to descriptorpb.FieldOptions.
var File_msg_proto protoreflect.FileDescriptor
var File_options_proto protoreflect.FileDescriptor
var PoolEdge = poolEdge{}
var PoolEdges = poolEdges{}
var PoolError = poolError{}
var PoolGetAllNodes = poolGetAllNodes{}
var PoolGetNodes = poolGetNodes{}
var PoolHttpBody = poolHttpBody{}
var PoolKeyValue = poolKeyValue{}
var PoolMessageContainer = poolMessageContainer{}
var PoolMessageEnvelope = poolMessageEnvelope{}
var PoolPing = poolPing{}
var PoolPong = poolPong{}
var PoolRedirect = poolRedirect{}
Functions ¶
func RegisterPrometheus ¶ added in v0.5.8
func RegisterPrometheus(registerer prometheus.Registerer)
Types ¶
type CliOpt ¶ added in v0.15.0
type CliOpt struct { // protocol defines what protocol should client use to communicate with server. // POSSIBLE VALUES: "ws", "http" Protocol *string `protobuf:"bytes,1,opt,name=protocol" json:"protocol,omitempty"` // contains filtered or unexported fields }
func (*CliOpt) Descriptor
deprecated
added in
v0.15.0
func (*CliOpt) GetProtocol ¶ added in v0.15.0
func (*CliOpt) ProtoMessage ¶ added in v0.15.0
func (*CliOpt) ProtoMessage()
func (*CliOpt) ProtoReflect ¶ added in v0.15.0
func (x *CliOpt) ProtoReflect() protoreflect.Message
type Cluster ¶ added in v0.8.6
type Cluster interface { Start() error Shutdown() Join(addr ...string) (int, error) Leave() error Members() []ClusterMember MembersByReplicaSet(replicaSets ...uint64) []ClusterMember MemberByID(string) ClusterMember MemberByHash(uint64) ClusterMember ReplicaSet() uint64 ServerID() string TotalReplicas() int Addr() string SetGatewayAddrs(hostPorts []string) error SetTunnelAddrs(hostPorts []string) error Subscribe(d ClusterDelegate) }
Cluster is the component which create and present the whole cluster of Edge nodes.
type ClusterDelegate ¶ added in v0.9.0
type ClusterMember ¶ added in v0.9.0
type Conn ¶ added in v0.1.9
type Conn interface { ConnID() uint64 ClientIP() string WriteBinary(streamID int64, data []byte) error // Persistent returns FALSE if this connection will be closed when edge.DispatchCtx has // been done. i.e. HTTP connections. It returns TRUE if this connection still alive when // edge.DispatchCtx has been done. i.e. WebSocket connections Persistent() bool Get(key string) interface{} Set(key string, val interface{}) }
Conn defines the Connection interface
type Edge ¶ added in v0.5.0
type Edge 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"` // contains filtered or unexported fields }
Edge
func (*Edge) Descriptor
deprecated
added in
v0.5.0
func (*Edge) GetHostPorts ¶ added in v0.5.0
func (*Edge) GetReplicaSet ¶ added in v0.5.0
func (*Edge) GetServerID ¶ added in v0.5.0
func (*Edge) MarshalJSON ¶ added in v0.10.3
func (*Edge) ProtoMessage ¶ added in v0.5.0
func (*Edge) ProtoMessage()
func (*Edge) ProtoReflect ¶ added in v0.5.0
func (x *Edge) ProtoReflect() protoreflect.Message
func (*Edge) UnmarshalJSON ¶ added in v0.10.3
type Edges ¶ added in v0.5.0
type Edges struct { Nodes []*Edge `protobuf:"bytes,1,rep,name=Nodes,proto3" json:"Nodes,omitempty"` // contains filtered or unexported fields }
Edges
func (*Edges) Descriptor
deprecated
added in
v0.5.0
func (*Edges) MarshalJSON ¶ added in v0.10.3
func (*Edges) ProtoMessage ¶ added in v0.5.0
func (*Edges) ProtoMessage()
func (*Edges) ProtoReflect ¶ added in v0.5.0
func (x *Edges) ProtoReflect() protoreflect.Message
func (*Edges) UnmarshalJSON ¶ added in v0.10.3
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"` Description string `protobuf:"bytes,3,opt,name=Description,proto3" json:"Description,omitempty"` // contains filtered or unexported fields }
Error
func (*Error) Descriptor
deprecated
func (*Error) GetDescription ¶ added in v0.5.0
func (*Error) MarshalJSON ¶ added in v0.10.3
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
func (*Error) ToEnvelope ¶ added in v0.8.0
func (x *Error) ToEnvelope(me *MessageEnvelope)
func (*Error) UnmarshalJSON ¶ added in v0.10.3
type Gateway ¶ added in v0.8.6
type Gateway interface { Start() Run() Shutdown() GetConn(connID uint64) Conn Addr() []string Protocol() GatewayProtocol Subscribe(d GatewayDelegate) }
Gateway defines the gateway interface where clients could connect and communicate with the Edge servers
type GatewayDelegate ¶ added in v0.16.0
type GatewayProtocol ¶ added in v0.9.0
type GatewayProtocol int32
const ( Undefined GatewayProtocol = 0 Dummy GatewayProtocol = 1 << iota Http Websocket Quic Grpc TCP = Http | Websocket // Http & Websocket )
func (GatewayProtocol) String ¶ added in v0.9.0
func (p GatewayProtocol) String() string
type GetAllNodes ¶ added in v0.7.4
type GetAllNodes struct {
// contains filtered or unexported fields
}
GetNodes @Function @Return: Edges
func (*GetAllNodes) Clone ¶ added in v0.12.0
func (x *GetAllNodes) Clone() *GetAllNodes
func (*GetAllNodes) DeepCopy ¶ added in v0.7.4
func (x *GetAllNodes) DeepCopy(z *GetAllNodes)
func (*GetAllNodes) Descriptor
deprecated
added in
v0.7.4
func (*GetAllNodes) Descriptor() ([]byte, []int)
Deprecated: Use GetAllNodes.ProtoReflect.Descriptor instead.
func (*GetAllNodes) Marshal ¶ added in v0.7.4
func (x *GetAllNodes) Marshal() ([]byte, error)
func (*GetAllNodes) MarshalJSON ¶ added in v0.10.3
func (x *GetAllNodes) MarshalJSON() ([]byte, error)
func (*GetAllNodes) ProtoMessage ¶ added in v0.7.4
func (*GetAllNodes) ProtoMessage()
func (*GetAllNodes) ProtoReflect ¶ added in v0.7.4
func (x *GetAllNodes) ProtoReflect() protoreflect.Message
func (*GetAllNodes) Reset ¶ added in v0.7.4
func (x *GetAllNodes) Reset()
func (*GetAllNodes) String ¶ added in v0.7.4
func (x *GetAllNodes) String() string
func (*GetAllNodes) Unmarshal ¶ added in v0.7.4
func (x *GetAllNodes) Unmarshal(b []byte) error
func (*GetAllNodes) UnmarshalJSON ¶ added in v0.10.3
func (x *GetAllNodes) UnmarshalJSON(b []byte) error
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 @Function @Return: Edges
func (*GetNodes) Descriptor
deprecated
added in
v0.1.5
func (*GetNodes) GetReplicaSet ¶ added in v0.1.5
func (*GetNodes) MarshalJSON ¶ added in v0.10.3
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
func (*GetNodes) UnmarshalJSON ¶ added in v0.10.3
type HttpBody ¶ added in v0.8.0
type HttpBody struct { ContentType string `protobuf:"bytes,1,opt,name=ContentType,proto3" json:"ContentType,omitempty"` Header []*KeyValue `protobuf:"bytes,2,rep,name=Header,proto3" json:"Header,omitempty"` Body []byte `protobuf:"bytes,3,opt,name=Body,proto3" json:"Body,omitempty"` // contains filtered or unexported fields }
HttpBody used by REST proxies to fill the output.
func (*HttpBody) Descriptor
deprecated
added in
v0.8.0
func (*HttpBody) GetContentType ¶ added in v0.8.0
func (*HttpBody) MarshalJSON ¶ added in v0.10.3
func (*HttpBody) ProtoMessage ¶ added in v0.8.0
func (*HttpBody) ProtoMessage()
func (*HttpBody) ProtoReflect ¶ added in v0.8.0
func (x *HttpBody) ProtoReflect() protoreflect.Message
func (*HttpBody) UnmarshalJSON ¶ added in v0.10.3
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) MarshalJSON ¶ added in v0.10.3
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
func (*KeyValue) ProtoReflect ¶
func (x *KeyValue) ProtoReflect() protoreflect.Message
func (*KeyValue) UnmarshalJSON ¶ added in v0.10.3
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"` // SyncRun makes the execution in sequence if it is TRUE SyncRun bool `protobuf:"varint,3,opt,name=SyncRun,proto3" json:"SyncRun,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) Clone ¶ added in v0.12.0
func (x *MessageContainer) Clone() *MessageContainer
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) GetSyncRun ¶ added in v0.14.1
func (x *MessageContainer) GetSyncRun() bool
func (*MessageContainer) Marshal ¶ added in v0.0.17
func (x *MessageContainer) Marshal() ([]byte, error)
func (*MessageContainer) MarshalJSON ¶ added in v0.10.3
func (x *MessageContainer) MarshalJSON() ([]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
func (*MessageContainer) UnmarshalJSON ¶ added in v0.10.3
func (x *MessageContainer) UnmarshalJSON(b []byte) error
type MessageEnvelope ¶
type MessageEnvelope struct { Constructor uint64 `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) Append ¶ added in v0.16.0
func (x *MessageEnvelope) Append(key, val string)
func (*MessageEnvelope) Carrier ¶ added in v0.16.0
func (x *MessageEnvelope) Carrier() *envelopeCarrier
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() uint64
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) MarshalJSON ¶ added in v0.10.3
func (x *MessageEnvelope) MarshalJSON() ([]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
func (*MessageEnvelope) UnmarshalJSON ¶ added in v0.10.3
func (x *MessageEnvelope) UnmarshalJSON(b []byte) error
func (*MessageEnvelope) Unwrap ¶ added in v0.12.45
func (x *MessageEnvelope) Unwrap() (protoreflect.Message, error)
type ModelOpt ¶ added in v0.15.0
type ModelOpt struct { // singleton marks this model as a singleton. Singleton *bool `protobuf:"varint,1,opt,name=singleton" json:"singleton,omitempty"` // global_datasource generates the code for remote repository // POSSIBLE VALUES: cql, sql GlobalDatasource *string `protobuf:"bytes,2,opt,name=global_datasource,json=globalDatasource" json:"global_datasource,omitempty"` // local_datasource generates the code for local repository // POSSIBLE VALUES: store, cql, sql LocalDatasource *string `protobuf:"bytes,3,opt,name=local_datasource,json=localDatasource" json:"local_datasource,omitempty"` // table a virtual table presentation to hold instances of this message, like rows in a table // PRIMARY KEY FORMAT: ( (partitionKey1, partitionKey2, ...), clusteringKey1, clusteringKey2, ...) Table *PrimaryKeyOpt `protobuf:"bytes,4,opt,name=table" json:"table,omitempty"` // view creates a materialized view of the aggregate based on the primary key. // PRIMARY KEY FORMAT: ( (partitionKey1, partitionKey2, ...), clusteringKey1, clusteringKey2, ...) // NOTE: The primary key of the view 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: // table = ((a, b), c) // view = ((c, a), d, b) View []*PrimaryKeyOpt `protobuf:"bytes,5,rep,name=view" json:"view,omitempty"` // contains filtered or unexported fields }
ModelOpt holds all the information if you want to create a model from your proto message.
func (*ModelOpt) Descriptor
deprecated
added in
v0.15.0
func (*ModelOpt) GetGlobalDatasource ¶ added in v0.15.0
func (*ModelOpt) GetLocalDatasource ¶ added in v0.15.0
func (*ModelOpt) GetSingleton ¶ added in v0.15.0
func (*ModelOpt) GetTable ¶ added in v0.15.0
func (x *ModelOpt) GetTable() *PrimaryKeyOpt
func (*ModelOpt) GetView ¶ added in v0.15.0
func (x *ModelOpt) GetView() []*PrimaryKeyOpt
func (*ModelOpt) ProtoMessage ¶ added in v0.15.0
func (*ModelOpt) ProtoMessage()
func (*ModelOpt) ProtoReflect ¶ added in v0.15.0
func (x *ModelOpt) ProtoReflect() protoreflect.Message
type Ping ¶ added in v0.12.56
type Ping struct { ID int64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*Ping) Descriptor
deprecated
added in
v0.12.56
func (*Ping) MarshalJSON ¶ added in v0.12.56
func (*Ping) ProtoMessage ¶ added in v0.12.56
func (*Ping) ProtoMessage()
func (*Ping) ProtoReflect ¶ added in v0.12.56
func (x *Ping) ProtoReflect() protoreflect.Message
func (*Ping) UnmarshalJSON ¶ added in v0.12.56
type Pong ¶ added in v0.12.56
type Pong struct { ID int64 `protobuf:"varint,2,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*Pong) Descriptor
deprecated
added in
v0.12.56
func (*Pong) MarshalJSON ¶ added in v0.12.56
func (*Pong) ProtoMessage ¶ added in v0.12.56
func (*Pong) ProtoMessage()
func (*Pong) ProtoReflect ¶ added in v0.12.56
func (x *Pong) ProtoReflect() protoreflect.Message
func (*Pong) UnmarshalJSON ¶ added in v0.12.56
type PrimaryKeyOpt ¶ added in v0.12.0
type PrimaryKeyOpt struct { PartKey []string `protobuf:"bytes,1,rep,name=part_key,json=partKey" json:"part_key,omitempty"` SortKey []string `protobuf:"bytes,2,rep,name=sort_key,json=sortKey" json:"sort_key,omitempty"` // Alias could be used to override the name of materialized view. If this is not set, Rony automatically // generates for you. Alias *string `protobuf:"bytes,4,opt,name=alias" json:"alias,omitempty"` // contains filtered or unexported fields }
PrimaryKeyOpt is the container for aggregate primary key settings. It is going to replace old rony_aggregate_table & rony_aggregate_view options.
func (*PrimaryKeyOpt) Descriptor
deprecated
added in
v0.12.0
func (*PrimaryKeyOpt) Descriptor() ([]byte, []int)
Deprecated: Use PrimaryKeyOpt.ProtoReflect.Descriptor instead.
func (*PrimaryKeyOpt) GetAlias ¶ added in v0.12.0
func (x *PrimaryKeyOpt) GetAlias() string
func (*PrimaryKeyOpt) GetPartKey ¶ added in v0.12.0
func (x *PrimaryKeyOpt) GetPartKey() []string
func (*PrimaryKeyOpt) GetSortKey ¶ added in v0.12.0
func (x *PrimaryKeyOpt) GetSortKey() []string
func (*PrimaryKeyOpt) ProtoMessage ¶ added in v0.12.0
func (*PrimaryKeyOpt) ProtoMessage()
func (*PrimaryKeyOpt) ProtoReflect ¶ added in v0.12.0
func (x *PrimaryKeyOpt) ProtoReflect() protoreflect.Message
func (*PrimaryKeyOpt) Reset ¶ added in v0.12.0
func (x *PrimaryKeyOpt) Reset()
func (*PrimaryKeyOpt) String ¶ added in v0.12.0
func (x *PrimaryKeyOpt) String() string
type Redirect ¶
type Redirect struct { Reason RedirectReason `protobuf:"varint,100,opt,name=Reason,proto3,enum=rony.RedirectReason" json:"Reason,omitempty"` Edges []*Edge `protobuf:"bytes,2,rep,name=Edges,proto3" json:"Edges,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) GetReason ¶ added in v0.1.5
func (x *Redirect) GetReason() RedirectReason
func (*Redirect) GetWaitInSec ¶
func (*Redirect) MarshalJSON ¶ added in v0.10.3
func (*Redirect) ProtoMessage ¶
func (*Redirect) ProtoMessage()
func (*Redirect) ProtoReflect ¶
func (x *Redirect) ProtoReflect() protoreflect.Message
func (*Redirect) UnmarshalJSON ¶ added in v0.10.3
type RedirectReason ¶ added in v0.1.5
type RedirectReason int32
RedirectReason
const ( RedirectReason_ReplicaSetSession RedirectReason = 0 RedirectReason_ReplicaSetRequest RedirectReason = 1 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 RestConn ¶ added in v0.10.0
type RestConn interface { Conn ReadHeader(key string) string WriteStatus(status int) WriteHeader(key, value string) MultiPart() (*multipart.Form, error) Method() string Path() string Body() []byte Redirect(statusCode int, newHostPort string) }
RestConn is same as Conn, but it supports REST format apis.
type RestOpt ¶ added in v0.10.3
type RestOpt struct { // method identifies the HTTP command: i.e. 'get', 'post', 'put', ... Method *string `protobuf:"bytes,1,req,name=method" json:"method,omitempty"` // path identifies the path that this RPC method will be available as REST endpoint. Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` // bind_path_variables is a list of pair of bindings. For example if we have a path '/part1/:var1/:var2' // and we want to bind 'var1' to field 'fieldVar1': "var1=fieldVar1" BindPathParam []string `protobuf:"bytes,3,rep,name=bind_path_param,json=bindPathParam" json:"bind_path_param,omitempty"` // bind_query_param is a list of pair of bindings. For example if we have a query param var1 // and we want to bind 'var1' to field 'fieldVar1': "var1=fieldVar1" BindQueryParam []string `protobuf:"bytes,4,rep,name=bind_query_param,json=bindQueryParam" json:"bind_query_param,omitempty"` // json_encode if is set then input and output data are json encoded version of the proto messages JsonEncode *bool `protobuf:"varint,5,opt,name=json_encode,json=jsonEncode" json:"json_encode,omitempty"` // contains filtered or unexported fields }
RestOpt is the container message for all the required and optional parameters for REST setup. By adding 'rony_rest' option to the method definition a REST wrapper will be generated for that method and that RPC handler will become accessible using REST endpoint.
func (*RestOpt) Descriptor
deprecated
added in
v0.10.3
func (*RestOpt) GetBindPathParam ¶ added in v0.14.34
func (*RestOpt) GetBindQueryParam ¶ added in v0.14.34
func (*RestOpt) GetJsonEncode ¶ added in v0.10.3
func (*RestOpt) ProtoMessage ¶ added in v0.10.3
func (*RestOpt) ProtoMessage()
func (*RestOpt) ProtoReflect ¶ added in v0.10.3
func (x *RestOpt) ProtoReflect() protoreflect.Message
type Router ¶ added in v0.14.1
type Router interface { Set(entityID string, replicaSet uint64, replace bool) error Get(entityID string) (replicaSet uint64, err error) }
Router could be used by Edge servers to find entities and redirect clients to the right Edge server.
type Tunnel ¶ added in v0.8.6
type Tunnel interface { Start() Run() Shutdown() Addr() []string }
Tunnel provides the communication channel between Edge servers. Tunnel is similar to Gateway in functionalities. However, Tunnel should be optimized for inter-communication between Edge servers, and Gateway is optimized for client-server communications.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
example
|
|
internal
|
|
gateway/tcp/util
Package wsutil provides utilities for working with WebSocket protocol.
|
Package wsutil provides utilities for working with WebSocket protocol. |
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. |