pb

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

README

1st Time Use Instruction

If this is the first time you are going to build protos of this package, please make sure you already install protoc form [https://github.com/google/protobuf] then run the following commands:

go install ./protoc-gen-gorony

Documentation

Index

Constants

View Source
const (
	TableModel1          = "model_1"
	ViewModel1ByShardKey = "model_1_by_shard_key"
	TableModel2          = "model_2"
	ViewModel2ByP1       = "model_2_by_p_1"
)

Tables

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
View Source
const C_Model1 int64 = 2074613123
View Source
const C_Model2 int64 = 3802219577

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{}
View Source
var PoolModel1 = poolModel1{}
View Source
var PoolModel2 = poolModel2{}

Functions

func ExecuteRemoteEcho added in v0.2.4

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

func ExecuteRemoteEchoDelay added in v0.2.4

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

func ExecuteRemoteEchoLeaderOnly added in v0.2.4

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

func ExecuteRemoteEchoTunnel added in v0.2.4

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

func Model1Insert added in v0.2.1

func Model1Insert(x *Model1) (err error)

func Model1ListByShardKey added in v0.2.1

func Model1ListByShardKey(shardKey int32, limit int32, f func(x *Model1) bool) error

func Model2Insert added in v0.2.1

func Model2Insert(x *Model2) (err error)

func Model2ListByP1 added in v0.2.1

func Model2ListByP1(p1 string, limit int32, f func(x *Model2) bool) error

func RegisterSample

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

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 added in v0.1.9

func (x *EchoRequest) GetReplicaSet() uint64

func (*EchoRequest) GetTimestamp

func (x *EchoRequest) GetTimestamp() int64

func (*EchoRequest) Marshal added in v0.0.17

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 added in v0.1.5

func (x *EchoResponse) GetResponder() string

func (*EchoResponse) GetServerID

func (x *EchoResponse) GetServerID() string

func (*EchoResponse) GetTimestamp

func (x *EchoResponse) GetTimestamp() int64

func (*EchoResponse) Marshal added in v0.0.17

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 Message1 added in v0.2.1

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 added in v0.2.1

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

func (*Message1) Descriptor deprecated added in v0.2.1

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

Deprecated: Use Message1.ProtoReflect.Descriptor instead.

func (*Message1) GetM2 added in v0.2.1

func (x *Message1) GetM2() *Message2

func (*Message1) GetM2S added in v0.2.1

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

func (*Message1) GetParam1 added in v0.2.1

func (x *Message1) GetParam1() int64

func (*Message1) GetParam2 added in v0.2.1

func (x *Message1) GetParam2() string

func (*Message1) Marshal added in v0.2.1

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

func (*Message1) ProtoMessage added in v0.2.1

func (*Message1) ProtoMessage()

func (*Message1) ProtoReflect added in v0.2.1

func (x *Message1) ProtoReflect() protoreflect.Message

func (*Message1) PushToContext added in v0.2.1

func (x *Message1) PushToContext(ctx *edge.RequestCtx)

func (*Message1) Reset added in v0.2.1

func (x *Message1) Reset()

func (*Message1) String added in v0.2.1

func (x *Message1) String() string

func (*Message1) Unmarshal added in v0.2.1

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

type Message2 added in v0.2.1

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 added in v0.2.1

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

func (*Message2) Descriptor deprecated added in v0.2.1

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

Deprecated: Use Message2.ProtoReflect.Descriptor instead.

func (*Message2) GetM1 added in v0.2.1

func (x *Message2) GetM1() *Message1

func (*Message2) GetP2 added in v0.2.1

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

func (*Message2) GetP3 added in v0.2.1

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

func (*Message2) GetParam1 added in v0.2.1

func (x *Message2) GetParam1() uint32

func (*Message2) Marshal added in v0.2.1

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

func (*Message2) ProtoMessage added in v0.2.1

func (*Message2) ProtoMessage()

func (*Message2) ProtoReflect added in v0.2.1

func (x *Message2) ProtoReflect() protoreflect.Message

func (*Message2) PushToContext added in v0.2.1

func (x *Message2) PushToContext(ctx *edge.RequestCtx)

func (*Message2) Reset added in v0.2.1

func (x *Message2) Reset()

func (*Message2) String added in v0.2.1

func (x *Message2) String() string

func (*Message2) Unmarshal added in v0.2.1

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

type Model1 added in v0.2.1

type Model1 struct {
	ID       int32    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	ShardKey int32    `protobuf:"varint,2,opt,name=ShardKey,proto3" json:"ShardKey,omitempty"`
	P1       string   `protobuf:"bytes,3,opt,name=P1,proto3" json:"P1,omitempty"`
	P2       []string `protobuf:"bytes,4,rep,name=P2,proto3" json:"P2,omitempty"`
	P5       uint64   `protobuf:"varint,5,opt,name=P5,proto3" json:"P5,omitempty"`
	// contains filtered or unexported fields
}

func Model1Get added in v0.2.1

func Model1Get(id int32, x *Model1) (*Model1, error)

func (*Model1) DeepCopy added in v0.2.1

func (x *Model1) DeepCopy(z *Model1)

func (*Model1) Descriptor deprecated added in v0.2.1

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

Deprecated: Use Model1.ProtoReflect.Descriptor instead.

func (*Model1) GetID added in v0.2.1

func (x *Model1) GetID() int32

func (*Model1) GetP1 added in v0.2.1

func (x *Model1) GetP1() string

func (*Model1) GetP2 added in v0.2.1

func (x *Model1) GetP2() []string

func (*Model1) GetP5 added in v0.2.1

func (x *Model1) GetP5() uint64

func (*Model1) GetShardKey added in v0.2.1

func (x *Model1) GetShardKey() int32

func (*Model1) Marshal added in v0.2.1

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

func (*Model1) ProtoMessage added in v0.2.1

func (*Model1) ProtoMessage()

func (*Model1) ProtoReflect added in v0.2.1

func (x *Model1) ProtoReflect() protoreflect.Message

func (*Model1) PushToContext added in v0.2.1

func (x *Model1) PushToContext(ctx *edge.RequestCtx)

func (*Model1) Reset added in v0.2.1

func (x *Model1) Reset()

func (*Model1) String added in v0.2.1

func (x *Model1) String() string

func (*Model1) Unmarshal added in v0.2.1

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

type Model2 added in v0.2.1

type Model2 struct {
	ID       int64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	ShardKey int32    `protobuf:"varint,2,opt,name=ShardKey,proto3" json:"ShardKey,omitempty"`
	P1       string   `protobuf:"bytes,3,opt,name=P1,proto3" json:"P1,omitempty"`
	P2       []string `protobuf:"bytes,4,rep,name=P2,proto3" json:"P2,omitempty"`
	P5       uint64   `protobuf:"varint,5,opt,name=P5,proto3" json:"P5,omitempty"`
	// contains filtered or unexported fields
}

func Model2Get added in v0.2.1

func Model2Get(id int64, shardKey int32, x *Model2) (*Model2, error)

func (*Model2) DeepCopy added in v0.2.1

func (x *Model2) DeepCopy(z *Model2)

func (*Model2) Descriptor deprecated added in v0.2.1

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

Deprecated: Use Model2.ProtoReflect.Descriptor instead.

func (*Model2) GetID added in v0.2.1

func (x *Model2) GetID() int64

func (*Model2) GetP1 added in v0.2.1

func (x *Model2) GetP1() string

func (*Model2) GetP2 added in v0.2.1

func (x *Model2) GetP2() []string

func (*Model2) GetP5 added in v0.2.1

func (x *Model2) GetP5() uint64

func (*Model2) GetShardKey added in v0.2.1

func (x *Model2) GetShardKey() int32

func (*Model2) Marshal added in v0.2.1

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

func (*Model2) ProtoMessage added in v0.2.1

func (*Model2) ProtoMessage()

func (*Model2) ProtoReflect added in v0.2.1

func (x *Model2) ProtoReflect() protoreflect.Message

func (*Model2) PushToContext added in v0.2.1

func (x *Model2) PushToContext(ctx *edge.RequestCtx)

func (*Model2) Reset added in v0.2.1

func (x *Model2) Reset()

func (*Model2) String added in v0.2.1

func (x *Model2) String() string

func (*Model2) Unmarshal added in v0.2.1

func (x *Model2) 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 added in v0.1.9

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

func (*SampleClient) EchoLeaderOnly added in v0.1.5

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

func (*SampleClient) EchoTunnel added in v0.1.5

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

type SampleWrapper

type SampleWrapper struct {
	// contains filtered or unexported fields
}

func (*SampleWrapper) EchoDelayWrapper added in v0.1.9

func (sw *SampleWrapper) EchoDelayWrapper(ctx *edge.RequestCtx, in *rony.MessageEnvelope)

func (*SampleWrapper) EchoLeaderOnlyWrapper added in v0.1.5

func (sw *SampleWrapper) EchoLeaderOnlyWrapper(ctx *edge.RequestCtx, in *rony.MessageEnvelope)

func (*SampleWrapper) EchoTunnelWrapper added in v0.1.5

func (sw *SampleWrapper) EchoTunnelWrapper(ctx *edge.RequestCtx, in *rony.MessageEnvelope)

func (*SampleWrapper) EchoWrapper

func (sw *SampleWrapper) EchoWrapper(ctx *edge.RequestCtx, in *rony.MessageEnvelope)

func (*SampleWrapper) Register

func (sw *SampleWrapper) Register(e *edge.Server)

Jump to

Keyboard shortcuts

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