service

package
v0.3.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const C_Echo int64 = 3073810188
View Source
const C_EchoDelay int64 = 3639218737
View Source
const C_EchoLeaderOnly int64 = 27569121
View Source
const C_EchoRequest int64 = 1904100324
View Source
const C_EchoResponse int64 = 4192619139
View Source
const C_EchoTunnel int64 = 3809767204
View Source
const C_Message1 int64 = 3131464828
View Source
const C_Message2 int64 = 598674886

Variables

View Source
var File_service_proto protoreflect.FileDescriptor
View Source
var PoolEchoRequest = poolEchoRequest{}
View Source
var PoolEchoResponse = poolEchoResponse{}
View Source
var PoolMessage1 = poolMessage1{}
View Source
var PoolMessage2 = poolMessage2{}

Functions

func ExecuteRemoteEcho

func ExecuteRemoteEcho(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, kvs ...*rony.KeyValue) error

func ExecuteRemoteEchoDelay

func ExecuteRemoteEchoDelay(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, kvs ...*rony.KeyValue) error

func ExecuteRemoteEchoLeaderOnly

func ExecuteRemoteEchoLeaderOnly(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, kvs ...*rony.KeyValue) error

func ExecuteRemoteEchoTunnel

func ExecuteRemoteEchoTunnel(ctx *edge.RequestCtx, replicaSet uint64, req *EchoRequest, res *EchoResponse, kvs ...*rony.KeyValue) error

func RegisterSample

func RegisterSample(h ISample, e *edge.Server, ho *edge.HandlerOptions)

func RegisterSampleCli added in v0.2.9

func RegisterSampleCli(h ISampleCli, c edgec.Client, rootCmd *cobra.Command)

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 ISample

type ISample interface {
	Echo(ctx *edge.RequestCtx, req *EchoRequest, res *EchoResponse)
	EchoLeaderOnly(ctx *edge.RequestCtx, req *EchoRequest, res *EchoResponse)
	EchoTunnel(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
	EchoLeaderOnly(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) DeepCopy

func (x *Message1) DeepCopy(z *Message1)

func (*Message1) Descriptor deprecated

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

Deprecated: Use Message1.ProtoReflect.Descriptor instead.

func (*Message1) GetM2

func (x *Message1) GetM2() *Message2

func (*Message1) GetM2S

func (x *Message1) GetM2S() []*Message2

func (*Message1) GetParam1

func (x *Message1) GetParam1() int64

func (*Message1) GetParam2

func (x *Message1) GetParam2() string

func (*Message1) Marshal

func (x *Message1) Marshal() ([]byte, error)

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)

func (*Message1) Reset

func (x *Message1) Reset()

func (*Message1) String

func (x *Message1) String() string

func (*Message1) Unmarshal

func (x *Message1) Unmarshal(b []byte) error

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) DeepCopy

func (x *Message2) DeepCopy(z *Message2)

func (*Message2) Descriptor deprecated

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

Deprecated: Use Message2.ProtoReflect.Descriptor instead.

func (*Message2) GetM1

func (x *Message2) GetM1() *Message1

func (*Message2) GetP2

func (x *Message2) GetP2() []byte

func (*Message2) GetP3

func (x *Message2) GetP3() []int32

func (*Message2) GetParam1

func (x *Message2) GetParam1() uint32

func (*Message2) Marshal

func (x *Message2) Marshal() ([]byte, error)

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)

func (*Message2) Reset

func (x *Message2) Reset()

func (*Message2) String

func (x *Message2) String() string

func (*Message2) Unmarshal

func (x *Message2) Unmarshal(b []byte) error

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) EchoLeaderOnly

func (c *SampleClient) EchoLeaderOnly(req *EchoRequest, kvs ...*rony.KeyValue) (*EchoResponse, error)

func (*SampleClient) EchoTunnel

func (c *SampleClient) EchoTunnel(req *EchoRequest, kvs ...*rony.KeyValue) (*EchoResponse, error)

Jump to

Keyboard shortcuts

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