Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSample(h ISample, e *edge.Server, preHandlers ...edge.Handler)
- func RegisterSampleCli(h ISampleCli, c edgec.Client, rootCmd *cobra.Command)
- func RegisterSampleWithFunc(h ISample, e *edge.Server, handlerFunc func(c int64) []edge.Handler)
- func TunnelRequestSampleEcho(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, ...) error
- func TunnelRequestSampleEchoDelay(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, ...) error
- func TunnelRequestSampleEchoInternal(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, ...) error
- func TunnelRequestSampleEchoTunnel(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, ...) error
- func TunnelRequestSampleGet(ctx *edge.RequestCtx, replicaSet uint64, req *GetRequest, res *GetResponse, ...) error
- func TunnelRequestSampleSet(ctx *edge.RequestCtx, replicaSet uint64, req *SetRequest, res *SetResponse, ...) error
- type EchoRequest
- func (x *EchoRequest) DeepCopy(z *EchoRequest)
- func (*EchoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EchoRequest) GetInt() int64
- func (x *EchoRequest) GetReplicaSet() uint64
- func (x *EchoRequest) GetTimestamp() int64
- func (x *EchoRequest) Marshal() ([]byte, error)
- func (*EchoRequest) ProtoMessage()
- func (x *EchoRequest) ProtoReflect() protoreflect.Message
- func (x *EchoRequest) PushToContext(ctx *edge.RequestCtx)
- func (x *EchoRequest) Reset()
- func (x *EchoRequest) String() string
- func (x *EchoRequest) Unmarshal(b []byte) error
- type EchoResponse
- func (x *EchoResponse) DeepCopy(z *EchoResponse)
- func (*EchoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EchoResponse) GetDelay() int64
- func (x *EchoResponse) GetInt() int64
- func (x *EchoResponse) GetResponder() string
- func (x *EchoResponse) GetServerID() string
- func (x *EchoResponse) GetTimestamp() int64
- func (x *EchoResponse) Marshal() ([]byte, error)
- func (*EchoResponse) ProtoMessage()
- func (x *EchoResponse) ProtoReflect() protoreflect.Message
- func (x *EchoResponse) PushToContext(ctx *edge.RequestCtx)
- func (x *EchoResponse) Reset()
- func (x *EchoResponse) String() string
- func (x *EchoResponse) Unmarshal(b []byte) error
- type GetRequest
- func (x *GetRequest) DeepCopy(z *GetRequest)
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetKey() []byte
- func (x *GetRequest) Marshal() ([]byte, error)
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) PushToContext(ctx *edge.RequestCtx)
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- func (x *GetRequest) Unmarshal(b []byte) error
- type GetResponse
- func (x *GetResponse) DeepCopy(z *GetResponse)
- func (*GetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetResponse) GetKey() []byte
- func (x *GetResponse) GetValue() []byte
- func (x *GetResponse) Marshal() ([]byte, error)
- func (*GetResponse) ProtoMessage()
- func (x *GetResponse) ProtoReflect() protoreflect.Message
- func (x *GetResponse) PushToContext(ctx *edge.RequestCtx)
- func (x *GetResponse) Reset()
- func (x *GetResponse) String() string
- func (x *GetResponse) Unmarshal(b []byte) error
- type ISample
- type ISampleCli
- type Message1
- func (x *Message1) DeepCopy(z *Message1)
- func (*Message1) Descriptor() ([]byte, []int)deprecated
- func (x *Message1) GetM2() *Message2
- func (x *Message1) GetM2S() []*Message2
- func (x *Message1) GetParam1() int64
- func (x *Message1) GetParam2() string
- func (x *Message1) Marshal() ([]byte, error)
- func (*Message1) ProtoMessage()
- func (x *Message1) ProtoReflect() protoreflect.Message
- func (x *Message1) PushToContext(ctx *edge.RequestCtx)
- func (x *Message1) Reset()
- func (x *Message1) String() string
- func (x *Message1) Unmarshal(b []byte) error
- type Message2
- func (x *Message2) DeepCopy(z *Message2)
- func (*Message2) Descriptor() ([]byte, []int)deprecated
- func (x *Message2) GetM1() *Message1
- func (x *Message2) GetP2() []byte
- func (x *Message2) GetP3() []int32
- func (x *Message2) GetParam1() uint32
- func (x *Message2) Marshal() ([]byte, error)
- func (*Message2) ProtoMessage()
- func (x *Message2) ProtoReflect() protoreflect.Message
- func (x *Message2) PushToContext(ctx *edge.RequestCtx)
- func (x *Message2) Reset()
- func (x *Message2) String() string
- func (x *Message2) Unmarshal(b []byte) error
- type SampleClient
- func (c *SampleClient) Echo(req *EchoRequest, kvs ...*rony.KeyValue) (*EchoResponse, error)
- func (c *SampleClient) EchoDelay(req *EchoRequest, kvs ...*rony.KeyValue) (*EchoResponse, error)
- func (c *SampleClient) EchoTunnel(req *EchoRequest, kvs ...*rony.KeyValue) (*EchoResponse, error)
- func (c *SampleClient) Get(req *GetRequest, kvs ...*rony.KeyValue) (*GetResponse, error)
- func (c *SampleClient) Set(req *SetRequest, kvs ...*rony.KeyValue) (*SetResponse, error)
- type SetRequest
- func (x *SetRequest) DeepCopy(z *SetRequest)
- func (*SetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SetRequest) GetKey() []byte
- func (x *SetRequest) GetValue() []byte
- func (x *SetRequest) Marshal() ([]byte, error)
- func (*SetRequest) ProtoMessage()
- func (x *SetRequest) ProtoReflect() protoreflect.Message
- func (x *SetRequest) PushToContext(ctx *edge.RequestCtx)
- func (x *SetRequest) Reset()
- func (x *SetRequest) String() string
- func (x *SetRequest) Unmarshal(b []byte) error
- type SetResponse
- func (x *SetResponse) DeepCopy(z *SetResponse)
- func (*SetResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SetResponse) GetOK() bool
- func (x *SetResponse) Marshal() ([]byte, error)
- func (*SetResponse) ProtoMessage()
- func (x *SetResponse) ProtoReflect() protoreflect.Message
- func (x *SetResponse) PushToContext(ctx *edge.RequestCtx)
- func (x *SetResponse) Reset()
- func (x *SetResponse) String() string
- func (x *SetResponse) Unmarshal(b []byte) error
Constants ¶
View Source
const C_EchoRequest int64 = 1904100324
View Source
const C_EchoResponse int64 = 4192619139
View Source
const C_GetRequest int64 = 3359917651
View Source
const C_GetResponse int64 = 2891601577
View Source
const C_Message1 int64 = 3131464828
View Source
const C_Message2 int64 = 598674886
View Source
const C_SampleEcho int64 = 3852587671
View Source
const C_SampleEchoDelay int64 = 1737692531
View Source
const C_SampleEchoInternal int64 = 3655883317
View Source
const C_SampleEchoTunnel int64 = 2071541407
View Source
const C_SampleGet int64 = 987350307
View Source
const C_SampleSet int64 = 569822863
View Source
const C_SetRequest int64 = 3858851777
View Source
const C_SetResponse int64 = 2994069984
Variables ¶
View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var PoolEchoRequest = poolEchoRequest{}
View Source
var PoolEchoResponse = poolEchoResponse{}
View Source
var PoolGetRequest = poolGetRequest{}
View Source
var PoolGetResponse = poolGetResponse{}
View Source
var PoolMessage1 = poolMessage1{}
View Source
var PoolMessage2 = poolMessage2{}
View Source
var PoolSetRequest = poolSetRequest{}
View Source
var PoolSetResponse = poolSetResponse{}
Functions ¶
func RegisterSampleCli ¶ added in v0.2.9
func RegisterSampleCli(h ISampleCli, c edgec.Client, rootCmd *cobra.Command)
func RegisterSampleWithFunc ¶ added in v0.6.4
func TunnelRequestSampleEcho ¶ added in v0.9.0
func TunnelRequestSampleEcho(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, kvs ...*rony.KeyValue) error
func TunnelRequestSampleEchoDelay ¶ added in v0.9.0
func TunnelRequestSampleEchoDelay(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, kvs ...*rony.KeyValue) error
func TunnelRequestSampleEchoInternal ¶ added in v0.9.0
func TunnelRequestSampleEchoInternal(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, kvs ...*rony.KeyValue) error
func TunnelRequestSampleEchoTunnel ¶ added in v0.9.0
func TunnelRequestSampleEchoTunnel(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, kvs ...*rony.KeyValue) error
func TunnelRequestSampleGet ¶ added in v0.9.0
func TunnelRequestSampleGet(ctx *edge.RequestCtx, replicaSet uint64, req *GetRequest, res *GetResponse, kvs ...*rony.KeyValue) error
func TunnelRequestSampleSet ¶ added in v0.9.0
func TunnelRequestSampleSet(ctx *edge.RequestCtx, replicaSet uint64, req *SetRequest, res *SetResponse, kvs ...*rony.KeyValue) error
Types ¶
type EchoRequest ¶
type EchoRequest struct { Int int64 `protobuf:"varint,1,opt,name=Int,proto3" json:"Int,omitempty"` Timestamp int64 `protobuf:"varint,3,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` ReplicaSet uint64 `protobuf:"varint,4,opt,name=ReplicaSet,proto3" json:"ReplicaSet,omitempty"` // contains filtered or unexported fields }
func (*EchoRequest) DeepCopy ¶
func (x *EchoRequest) DeepCopy(z *EchoRequest)
func (*EchoRequest) Descriptor
deprecated
func (*EchoRequest) Descriptor() ([]byte, []int)
Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
func (*EchoRequest) GetInt ¶
func (x *EchoRequest) GetInt() int64
func (*EchoRequest) GetReplicaSet ¶
func (x *EchoRequest) GetReplicaSet() uint64
func (*EchoRequest) GetTimestamp ¶
func (x *EchoRequest) GetTimestamp() int64
func (*EchoRequest) Marshal ¶
func (x *EchoRequest) Marshal() ([]byte, error)
func (*EchoRequest) ProtoMessage ¶
func (*EchoRequest) ProtoMessage()
func (*EchoRequest) ProtoReflect ¶
func (x *EchoRequest) ProtoReflect() protoreflect.Message
func (*EchoRequest) PushToContext ¶
func (x *EchoRequest) PushToContext(ctx *edge.RequestCtx)
func (*EchoRequest) Reset ¶
func (x *EchoRequest) Reset()
func (*EchoRequest) String ¶
func (x *EchoRequest) String() string
func (*EchoRequest) Unmarshal ¶
func (x *EchoRequest) Unmarshal(b []byte) error
type EchoResponse ¶
type EchoResponse struct { Int int64 `protobuf:"varint,1,opt,name=Int,proto3" json:"Int,omitempty"` Responder string `protobuf:"bytes,2,opt,name=Responder,proto3" json:"Responder,omitempty"` Timestamp int64 `protobuf:"varint,4,opt,name=Timestamp,proto3" json:"Timestamp,omitempty"` Delay int64 `protobuf:"varint,5,opt,name=Delay,proto3" json:"Delay,omitempty"` ServerID string `protobuf:"bytes,6,opt,name=ServerID,proto3" json:"ServerID,omitempty"` // contains filtered or unexported fields }
func (*EchoResponse) DeepCopy ¶
func (x *EchoResponse) DeepCopy(z *EchoResponse)
func (*EchoResponse) Descriptor
deprecated
func (*EchoResponse) Descriptor() ([]byte, []int)
Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.
func (*EchoResponse) GetDelay ¶
func (x *EchoResponse) GetDelay() int64
func (*EchoResponse) GetInt ¶
func (x *EchoResponse) GetInt() int64
func (*EchoResponse) GetResponder ¶
func (x *EchoResponse) GetResponder() string
func (*EchoResponse) GetServerID ¶
func (x *EchoResponse) GetServerID() string
func (*EchoResponse) GetTimestamp ¶
func (x *EchoResponse) GetTimestamp() int64
func (*EchoResponse) Marshal ¶
func (x *EchoResponse) Marshal() ([]byte, error)
func (*EchoResponse) ProtoMessage ¶
func (*EchoResponse) ProtoMessage()
func (*EchoResponse) ProtoReflect ¶
func (x *EchoResponse) ProtoReflect() protoreflect.Message
func (*EchoResponse) PushToContext ¶
func (x *EchoResponse) PushToContext(ctx *edge.RequestCtx)
func (*EchoResponse) Reset ¶
func (x *EchoResponse) Reset()
func (*EchoResponse) String ¶
func (x *EchoResponse) String() string
func (*EchoResponse) Unmarshal ¶
func (x *EchoResponse) Unmarshal(b []byte) error
type GetRequest ¶ added in v0.7.2
type GetRequest struct { Key []byte `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) DeepCopy ¶ added in v0.7.2
func (x *GetRequest) DeepCopy(z *GetRequest)
func (*GetRequest) Descriptor
deprecated
added in
v0.7.2
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetKey ¶ added in v0.7.2
func (x *GetRequest) GetKey() []byte
func (*GetRequest) Marshal ¶ added in v0.7.2
func (x *GetRequest) Marshal() ([]byte, error)
func (*GetRequest) ProtoMessage ¶ added in v0.7.2
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶ added in v0.7.2
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) PushToContext ¶ added in v0.7.2
func (x *GetRequest) PushToContext(ctx *edge.RequestCtx)
func (*GetRequest) Reset ¶ added in v0.7.2
func (x *GetRequest) Reset()
func (*GetRequest) String ¶ added in v0.7.2
func (x *GetRequest) String() string
func (*GetRequest) Unmarshal ¶ added in v0.7.2
func (x *GetRequest) Unmarshal(b []byte) error
type GetResponse ¶ added in v0.7.2
type GetResponse struct { Key []byte `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` // contains filtered or unexported fields }
func (*GetResponse) DeepCopy ¶ added in v0.7.2
func (x *GetResponse) DeepCopy(z *GetResponse)
func (*GetResponse) Descriptor
deprecated
added in
v0.7.2
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetKey ¶ added in v0.7.2
func (x *GetResponse) GetKey() []byte
func (*GetResponse) GetValue ¶ added in v0.7.2
func (x *GetResponse) GetValue() []byte
func (*GetResponse) Marshal ¶ added in v0.7.2
func (x *GetResponse) Marshal() ([]byte, error)
func (*GetResponse) ProtoMessage ¶ added in v0.7.2
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶ added in v0.7.2
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) PushToContext ¶ added in v0.7.2
func (x *GetResponse) PushToContext(ctx *edge.RequestCtx)
func (*GetResponse) Reset ¶ added in v0.7.2
func (x *GetResponse) Reset()
func (*GetResponse) String ¶ added in v0.7.2
func (x *GetResponse) String() string
func (*GetResponse) Unmarshal ¶ added in v0.7.2
func (x *GetResponse) Unmarshal(b []byte) error
type ISample ¶
type ISample interface { Echo(ctx *edge.RequestCtx, req *EchoRequest, res *EchoResponse) Set(ctx *edge.RequestCtx, req *SetRequest, res *SetResponse) Get(ctx *edge.RequestCtx, req *GetRequest, res *GetResponse) EchoTunnel(ctx *edge.RequestCtx, req *EchoRequest, res *EchoResponse) EchoInternal(ctx *edge.RequestCtx, req *EchoRequest, res *EchoResponse) EchoDelay(ctx *edge.RequestCtx, req *EchoRequest, res *EchoResponse) }
type ISampleCli ¶ added in v0.2.9
type ISampleCli interface { Echo(cli *SampleClient, cmd *cobra.Command, args []string) error Set(cli *SampleClient, cmd *cobra.Command, args []string) error Get(cli *SampleClient, cmd *cobra.Command, args []string) error EchoTunnel(cli *SampleClient, cmd *cobra.Command, args []string) error EchoDelay(cli *SampleClient, cmd *cobra.Command, args []string) error }
type Message1 ¶
type Message1 struct { Param1 int64 `protobuf:"varint,1,opt,name=Param1,proto3" json:"Param1,omitempty"` Param2 string `protobuf:"bytes,2,opt,name=Param2,proto3" json:"Param2,omitempty"` M2 *Message2 `protobuf:"bytes,3,opt,name=M2,proto3" json:"M2,omitempty"` M2S []*Message2 `protobuf:"bytes,4,rep,name=M2S,proto3" json:"M2S,omitempty"` // contains filtered or unexported fields }
func (*Message1) Descriptor
deprecated
func (*Message1) ProtoMessage ¶
func (*Message1) ProtoMessage()
func (*Message1) ProtoReflect ¶
func (x *Message1) ProtoReflect() protoreflect.Message
func (*Message1) PushToContext ¶
func (x *Message1) PushToContext(ctx *edge.RequestCtx)
type Message2 ¶
type Message2 struct { Param1 uint32 `protobuf:"fixed32,1,opt,name=Param1,proto3" json:"Param1,omitempty"` P2 []byte `protobuf:"bytes,2,opt,name=P2,proto3" json:"P2,omitempty"` P3 []int32 `protobuf:"varint,3,rep,packed,name=P3,proto3" json:"P3,omitempty"` M1 *Message1 `protobuf:"bytes,4,opt,name=M1,proto3" json:"M1,omitempty"` // contains filtered or unexported fields }
func (*Message2) Descriptor
deprecated
func (*Message2) ProtoMessage ¶
func (*Message2) ProtoMessage()
func (*Message2) ProtoReflect ¶
func (x *Message2) ProtoReflect() protoreflect.Message
func (*Message2) PushToContext ¶
func (x *Message2) PushToContext(ctx *edge.RequestCtx)
type SampleClient ¶
type SampleClient struct {
// contains filtered or unexported fields
}
func NewSampleClient ¶
func NewSampleClient(ec edgec.Client) *SampleClient
func (*SampleClient) Echo ¶
func (c *SampleClient) Echo(req *EchoRequest, kvs ...*rony.KeyValue) (*EchoResponse, error)
func (*SampleClient) EchoDelay ¶
func (c *SampleClient) EchoDelay(req *EchoRequest, kvs ...*rony.KeyValue) (*EchoResponse, error)
func (*SampleClient) EchoTunnel ¶
func (c *SampleClient) EchoTunnel(req *EchoRequest, kvs ...*rony.KeyValue) (*EchoResponse, error)
func (*SampleClient) Get ¶ added in v0.7.2
func (c *SampleClient) Get(req *GetRequest, kvs ...*rony.KeyValue) (*GetResponse, error)
func (*SampleClient) Set ¶ added in v0.7.2
func (c *SampleClient) Set(req *SetRequest, kvs ...*rony.KeyValue) (*SetResponse, error)
type SetRequest ¶ added in v0.7.2
type SetRequest struct { Key []byte `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"` // contains filtered or unexported fields }
func (*SetRequest) DeepCopy ¶ added in v0.7.2
func (x *SetRequest) DeepCopy(z *SetRequest)
func (*SetRequest) Descriptor
deprecated
added in
v0.7.2
func (*SetRequest) Descriptor() ([]byte, []int)
Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.
func (*SetRequest) GetKey ¶ added in v0.7.2
func (x *SetRequest) GetKey() []byte
func (*SetRequest) GetValue ¶ added in v0.7.2
func (x *SetRequest) GetValue() []byte
func (*SetRequest) Marshal ¶ added in v0.7.2
func (x *SetRequest) Marshal() ([]byte, error)
func (*SetRequest) ProtoMessage ¶ added in v0.7.2
func (*SetRequest) ProtoMessage()
func (*SetRequest) ProtoReflect ¶ added in v0.7.2
func (x *SetRequest) ProtoReflect() protoreflect.Message
func (*SetRequest) PushToContext ¶ added in v0.7.2
func (x *SetRequest) PushToContext(ctx *edge.RequestCtx)
func (*SetRequest) Reset ¶ added in v0.7.2
func (x *SetRequest) Reset()
func (*SetRequest) String ¶ added in v0.7.2
func (x *SetRequest) String() string
func (*SetRequest) Unmarshal ¶ added in v0.7.2
func (x *SetRequest) Unmarshal(b []byte) error
type SetResponse ¶ added in v0.7.2
type SetResponse struct { OK bool `protobuf:"varint,1,opt,name=OK,proto3" json:"OK,omitempty"` // contains filtered or unexported fields }
func (*SetResponse) DeepCopy ¶ added in v0.7.2
func (x *SetResponse) DeepCopy(z *SetResponse)
func (*SetResponse) Descriptor
deprecated
added in
v0.7.2
func (*SetResponse) Descriptor() ([]byte, []int)
Deprecated: Use SetResponse.ProtoReflect.Descriptor instead.
func (*SetResponse) GetOK ¶ added in v0.7.2
func (x *SetResponse) GetOK() bool
func (*SetResponse) Marshal ¶ added in v0.7.2
func (x *SetResponse) Marshal() ([]byte, error)
func (*SetResponse) ProtoMessage ¶ added in v0.7.2
func (*SetResponse) ProtoMessage()
func (*SetResponse) ProtoReflect ¶ added in v0.7.2
func (x *SetResponse) ProtoReflect() protoreflect.Message
func (*SetResponse) PushToContext ¶ added in v0.7.2
func (x *SetResponse) PushToContext(ctx *edge.RequestCtx)
func (*SetResponse) Reset ¶ added in v0.7.2
func (x *SetResponse) Reset()
func (*SetResponse) String ¶ added in v0.7.2
func (x *SetResponse) String() string
func (*SetResponse) Unmarshal ¶ added in v0.7.2
func (x *SetResponse) Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.