diff --git a/docs/server.md b/docs/server.md index b42e14f2..fab17517 100644 --- a/docs/server.md +++ b/docs/server.md @@ -12,6 +12,9 @@ Server地址,格式为:"IP:PORT"。 ## Protocol Server的接口协议,目前支持HTTP。 +## Weight +Weight 服务器的权重(当该服务器所属的集群负载方式是权重轮询时则需要配置) + ## MaxQPS Server能够支持的最大QPS,用于流控。Gateway采用令牌桶算法,根据QPS限制流量,保护后端Server被压垮。 diff --git a/pkg/client/server.go b/pkg/client/server.go index bd5e0e6c..7815fcba 100644 --- a/pkg/client/server.go +++ b/pkg/client/server.go @@ -80,6 +80,12 @@ func (sb *ServerBuilder) MaxQPS(max int64) *ServerBuilder { return sb } +// Weight set robin weight +func (sb *ServerBuilder) Weight(weight int64) *ServerBuilder { + sb.value.Weight = weight + return sb +} + // NoCircuitBreaker no circuit breaker func (sb *ServerBuilder) NoCircuitBreaker() *ServerBuilder { sb.value.CircuitBreaker = nil diff --git a/pkg/lb/lb.go b/pkg/lb/lb.go index 2d5a90dc..2a5e1139 100644 --- a/pkg/lb/lb.go +++ b/pkg/lb/lb.go @@ -15,12 +15,13 @@ var ( // LBS map loadBalance name and process function LBS = map[metapb.LoadBalance]func() LoadBalance{ metapb.RoundRobin: NewRoundRobin, + metapb.WightRobin: NewWeightRobin, } ) -// LoadBalance loadBalance interface +// LoadBalance loadBalance interface returns selected server's id type LoadBalance interface { - Select(req *fasthttp.Request, servers *list.List) int + Select(req *fasthttp.Request, servers *list.List) uint64 } // GetSupportLBS return supported loadBalances @@ -28,7 +29,11 @@ func GetSupportLBS() []metapb.LoadBalance { return supportLbs } -// NewLoadBalance create a LoadBalance +// NewLoadBalance create a LoadBalance,if LoadBalance function is not supported +// it will return NewRoundRobin func NewLoadBalance(name metapb.LoadBalance) LoadBalance { - return LBS[name]() + if l, ok := LBS[name]; ok { + return l() + } + return NewRoundRobin() } diff --git a/pkg/lb/roundrobin.go b/pkg/lb/roundrobin.go index 7f3caab2..d8635016 100644 --- a/pkg/lb/roundrobin.go +++ b/pkg/lb/roundrobin.go @@ -2,6 +2,8 @@ package lb import ( "container/list" + "github.com/fagongzi/gateway/pkg/pb/metapb" + "github.com/fagongzi/util/collection" "sync/atomic" "github.com/valyala/fasthttp" @@ -23,12 +25,19 @@ func NewRoundRobin() LoadBalance { } // Select select a server from servers using RoundRobin -func (rr RoundRobin) Select(req *fasthttp.Request, servers *list.List) int { +func (rr RoundRobin) Select(req *fasthttp.Request, servers *list.List) uint64 { l := uint64(servers.Len()) if 0 >= l { - return -1 + return 0 } - return int(atomic.AddUint64(rr.ops, 1) % l) + idx := int(atomic.AddUint64(rr.ops, 1) % l) + + v := collection.Get(servers, idx).Value + if v == nil { + return 0 + } + + return v.(*metapb.Server).ID } diff --git a/pkg/lb/weightrobin.go b/pkg/lb/weightrobin.go new file mode 100644 index 00000000..6eaa865e --- /dev/null +++ b/pkg/lb/weightrobin.go @@ -0,0 +1,61 @@ +package lb + +import ( + "container/list" + "github.com/fagongzi/gateway/pkg/pb/metapb" + "github.com/valyala/fasthttp" +) + +// WeightRobin weight robin loadBalance impl +type WeightRobin struct { + opts map[uint64]*weightRobin +} + +// weightRobin used to save the weight info of server +type weightRobin struct { + effectiveWeight int64 + currentWeight int64 +} + +// NewWeightRobin create a WeightRobin +func NewWeightRobin() LoadBalance { + return &WeightRobin{ + opts: make(map[uint64]*weightRobin, 1024), + } +} + +// Select select a server from servers using WeightRobin +func (w *WeightRobin) Select(req *fasthttp.Request, servers *list.List) (best uint64) { + var total int64 + + for iter := servers.Back(); iter != nil; iter = iter.Prev() { + svr := iter.Value.(*metapb.Server) + + id := svr.ID + if _, ok := w.opts[id]; !ok { + w.opts[id] = &weightRobin{ + effectiveWeight: svr.Weight, + } + } + + wt := w.opts[id] + wt.currentWeight += wt.effectiveWeight + total += wt.effectiveWeight + + if wt.effectiveWeight < svr.Weight { + wt.effectiveWeight++ + } + + if best == 0 || w.opts[uint64(best)] == nil || wt.currentWeight > w.opts[best].currentWeight { + best = id + } + } + + if best == 0 { + return 0 + } + + w.opts[best].currentWeight -= total + + return best +} diff --git a/pkg/lb/weightrobin_test.go b/pkg/lb/weightrobin_test.go new file mode 100644 index 00000000..5729a90f --- /dev/null +++ b/pkg/lb/weightrobin_test.go @@ -0,0 +1,69 @@ +package lb + +import ( + "container/list" + "github.com/fagongzi/gateway/pkg/pb/metapb" + "github.com/valyala/fasthttp" + "testing" +) + +func TestWeightRobin_Select(t *testing.T) { + li := list.New() + + li.PushBack(&metapb.Server{ + ID: 1, + Weight: 20, + }) + li.PushBack(&metapb.Server{ + ID: 2, + Weight: 10, + }) + li.PushBack(&metapb.Server{ + ID: 3, + Weight: 35, + }) + li.PushBack(&metapb.Server{ + ID: 4, + Weight: 5, + }) + + type fields struct { + opts map[uint64]*weightRobin + } + type args struct { + req *fasthttp.Request + servers *list.List + } + tests := []struct { + name string + fields fields + args args + wantBest []int + }{ + { + name: "test_case_1", + fields: struct{ opts map[uint64]*weightRobin }{opts: make(map[uint64]*weightRobin, 50)}, + args: struct { + req *fasthttp.Request + servers *list.List + }{req: nil, servers: li}, + wantBest: []int{20, 10, 35, 5}, + }, + } + for _, tt := range tests { + var res = make(map[uint64]int) + t.Run(tt.name, func(t *testing.T) { + w := &WeightRobin{ + opts: tt.fields.opts, + } + for i := 0; i < 70; i++ { + res[w.Select(tt.args.req, tt.args.servers)]++ + } + }) + for k, v := range res { + if tt.wantBest[k-1] != v { + t.Errorf("WeightRobin.Select() = %v, want %v", res, tt.wantBest) + } + } + } +} diff --git a/pkg/pb/metapb/metapb.pb.go b/pkg/pb/metapb/metapb.pb.go index 95b8c443..c2ef40d6 100644 --- a/pkg/pb/metapb/metapb.pb.go +++ b/pkg/pb/metapb/metapb.pb.go @@ -1,39 +1,6 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: metapb.proto -// DO NOT EDIT! - -/* - Package metapb is a generated protocol buffer package. - - It is generated from these files: - metapb.proto - - It has these top-level messages: - Proxy - Cluster - HeathCheck - CircuitBreaker - Server - Bind - PairValue - IPAccessControl - HTTPResult - Parameter - ValidationRule - Validation - RetryStrategy - DispatchNode - Cache - RenderTemplate - RenderObject - RenderAttr - API - Condition - Routing - WebSocketOptions - System - CountMetric -*/ + package metapb import ( @@ -43,6 +10,8 @@ import ( math "math" + _ "github.com/gogo/protobuf/gogoproto" + io "io" ) @@ -93,7 +62,9 @@ func (x *Status) UnmarshalJSON(data []byte) error { *x = Status(value) return nil } -func (Status) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{0} } +func (Status) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{0} +} // CircuitStatus is the circuit breaker status type CircuitStatus int32 @@ -131,7 +102,9 @@ func (x *CircuitStatus) UnmarshalJSON(data []byte) error { *x = CircuitStatus(value) return nil } -func (CircuitStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{1} } +func (CircuitStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{1} +} // LoadBalance the load balance enum type LoadBalance int32 @@ -139,15 +112,18 @@ type LoadBalance int32 const ( RoundRobin LoadBalance = 0 IPHash LoadBalance = 1 + WightRobin LoadBalance = 2 ) var LoadBalance_name = map[int32]string{ 0: "RoundRobin", 1: "IPHash", + 2: "WightRobin", } var LoadBalance_value = map[string]int32{ "RoundRobin": 0, "IPHash": 1, + "WightRobin": 2, } func (x LoadBalance) Enum() *LoadBalance { @@ -166,7 +142,9 @@ func (x *LoadBalance) UnmarshalJSON(data []byte) error { *x = LoadBalance(value) return nil } -func (LoadBalance) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{2} } +func (LoadBalance) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{2} +} // Protocol is the protocol of the backend api type Protocol int32 @@ -207,7 +185,9 @@ func (x *Protocol) UnmarshalJSON(data []byte) error { *x = Protocol(value) return nil } -func (Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{3} } +func (Protocol) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{3} +} type Source int32 @@ -253,7 +233,9 @@ func (x *Source) UnmarshalJSON(data []byte) error { *x = Source(value) return nil } -func (Source) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{4} } +func (Source) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{4} +} type RuleType int32 @@ -284,7 +266,9 @@ func (x *RuleType) UnmarshalJSON(data []byte) error { *x = RuleType(value) return nil } -func (RuleType) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{5} } +func (RuleType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{5} +} type CMP int32 @@ -333,7 +317,9 @@ func (x *CMP) UnmarshalJSON(data []byte) error { *x = CMP(value) return nil } -func (CMP) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{6} } +func (CMP) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{6} +} type RoutingStrategy int32 @@ -367,7 +353,9 @@ func (x *RoutingStrategy) UnmarshalJSON(data []byte) error { *x = RoutingStrategy(value) return nil } -func (RoutingStrategy) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{7} } +func (RoutingStrategy) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{7} +} type MatchRule int32 @@ -404,19 +392,51 @@ func (x *MatchRule) UnmarshalJSON(data []byte) error { *x = MatchRule(value) return nil } -func (MatchRule) EnumDescriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{8} } +func (MatchRule) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{8} +} // Proxy is a meta data of the gateway proxy type Proxy struct { - Addr string `protobuf:"bytes,1,opt,name=addr" json:"addr"` - AddrRPC string `protobuf:"bytes,2,opt,name=addrRPC" json:"addrRPC"` - XXX_unrecognized []byte `json:"-"` + Addr string `protobuf:"bytes,1,opt,name=addr" json:"addr"` + AddrRPC string `protobuf:"bytes,2,opt,name=addrRPC" json:"addrRPC"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Proxy) Reset() { *m = Proxy{} } -func (m *Proxy) String() string { return proto.CompactTextString(m) } -func (*Proxy) ProtoMessage() {} -func (*Proxy) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{0} } +func (m *Proxy) Reset() { *m = Proxy{} } +func (m *Proxy) String() string { return proto.CompactTextString(m) } +func (*Proxy) ProtoMessage() {} +func (*Proxy) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{0} +} +func (m *Proxy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Proxy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Proxy.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Proxy) XXX_Merge(src proto.Message) { + xxx_messageInfo_Proxy.Merge(dst, src) +} +func (m *Proxy) XXX_Size() int { + return m.Size() +} +func (m *Proxy) XXX_DiscardUnknown() { + xxx_messageInfo_Proxy.DiscardUnknown(m) +} + +var xxx_messageInfo_Proxy proto.InternalMessageInfo func (m *Proxy) GetAddr() string { if m != nil { @@ -434,16 +454,46 @@ func (m *Proxy) GetAddrRPC() string { // Cluster is a set of server has same interface type Cluster struct { - ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` - Name string `protobuf:"bytes,2,opt,name=name" json:"name"` - LoadBalance LoadBalance `protobuf:"varint,3,opt,name=loadBalance,enum=metapb.LoadBalance" json:"loadBalance"` - XXX_unrecognized []byte `json:"-"` + ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` + Name string `protobuf:"bytes,2,opt,name=name" json:"name"` + LoadBalance LoadBalance `protobuf:"varint,3,opt,name=loadBalance,enum=metapb.LoadBalance" json:"loadBalance"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cluster) Reset() { *m = Cluster{} } +func (m *Cluster) String() string { return proto.CompactTextString(m) } +func (*Cluster) ProtoMessage() {} +func (*Cluster) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{1} +} +func (m *Cluster) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Cluster.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Cluster) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cluster.Merge(dst, src) +} +func (m *Cluster) XXX_Size() int { + return m.Size() +} +func (m *Cluster) XXX_DiscardUnknown() { + xxx_messageInfo_Cluster.DiscardUnknown(m) } -func (m *Cluster) Reset() { *m = Cluster{} } -func (m *Cluster) String() string { return proto.CompactTextString(m) } -func (*Cluster) ProtoMessage() {} -func (*Cluster) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{1} } +var xxx_messageInfo_Cluster proto.InternalMessageInfo func (m *Cluster) GetID() uint64 { if m != nil { @@ -468,17 +518,47 @@ func (m *Cluster) GetLoadBalance() LoadBalance { // HeathCheck is the heath check type HeathCheck struct { - Path string `protobuf:"bytes,1,opt,name=path" json:"path"` - Body string `protobuf:"bytes,2,opt,name=body" json:"body"` - CheckInterval int64 `protobuf:"varint,3,opt,name=checkInterval" json:"checkInterval"` - Timeout int64 `protobuf:"varint,4,opt,name=timeout" json:"timeout"` - XXX_unrecognized []byte `json:"-"` + Path string `protobuf:"bytes,1,opt,name=path" json:"path"` + Body string `protobuf:"bytes,2,opt,name=body" json:"body"` + CheckInterval int64 `protobuf:"varint,3,opt,name=checkInterval" json:"checkInterval"` + Timeout int64 `protobuf:"varint,4,opt,name=timeout" json:"timeout"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HeathCheck) Reset() { *m = HeathCheck{} } +func (m *HeathCheck) String() string { return proto.CompactTextString(m) } +func (*HeathCheck) ProtoMessage() {} +func (*HeathCheck) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{2} +} +func (m *HeathCheck) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HeathCheck) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HeathCheck.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *HeathCheck) XXX_Merge(src proto.Message) { + xxx_messageInfo_HeathCheck.Merge(dst, src) +} +func (m *HeathCheck) XXX_Size() int { + return m.Size() +} +func (m *HeathCheck) XXX_DiscardUnknown() { + xxx_messageInfo_HeathCheck.DiscardUnknown(m) } -func (m *HeathCheck) Reset() { *m = HeathCheck{} } -func (m *HeathCheck) String() string { return proto.CompactTextString(m) } -func (*HeathCheck) ProtoMessage() {} -func (*HeathCheck) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{2} } +var xxx_messageInfo_HeathCheck proto.InternalMessageInfo func (m *HeathCheck) GetPath() string { if m != nil { @@ -510,18 +590,48 @@ func (m *HeathCheck) GetTimeout() int64 { // CircuitBreaker circuit breaker type CircuitBreaker struct { - CloseTimeout int64 `protobuf:"varint,1,opt,name=closeTimeout" json:"closeTimeout"` - HalfTrafficRate int32 `protobuf:"varint,2,opt,name=halfTrafficRate" json:"halfTrafficRate"` - RateCheckPeriod int64 `protobuf:"varint,3,opt,name=rateCheckPeriod" json:"rateCheckPeriod"` - FailureRateToClose int32 `protobuf:"varint,4,opt,name=failureRateToClose" json:"failureRateToClose"` - SucceedRateToOpen int32 `protobuf:"varint,5,opt,name=succeedRateToOpen" json:"succeedRateToOpen"` - XXX_unrecognized []byte `json:"-"` + CloseTimeout int64 `protobuf:"varint,1,opt,name=closeTimeout" json:"closeTimeout"` + HalfTrafficRate int32 `protobuf:"varint,2,opt,name=halfTrafficRate" json:"halfTrafficRate"` + RateCheckPeriod int64 `protobuf:"varint,3,opt,name=rateCheckPeriod" json:"rateCheckPeriod"` + FailureRateToClose int32 `protobuf:"varint,4,opt,name=failureRateToClose" json:"failureRateToClose"` + SucceedRateToOpen int32 `protobuf:"varint,5,opt,name=succeedRateToOpen" json:"succeedRateToOpen"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CircuitBreaker) Reset() { *m = CircuitBreaker{} } +func (m *CircuitBreaker) String() string { return proto.CompactTextString(m) } +func (*CircuitBreaker) ProtoMessage() {} +func (*CircuitBreaker) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{3} +} +func (m *CircuitBreaker) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CircuitBreaker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CircuitBreaker.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CircuitBreaker) XXX_Merge(src proto.Message) { + xxx_messageInfo_CircuitBreaker.Merge(dst, src) +} +func (m *CircuitBreaker) XXX_Size() int { + return m.Size() +} +func (m *CircuitBreaker) XXX_DiscardUnknown() { + xxx_messageInfo_CircuitBreaker.DiscardUnknown(m) } -func (m *CircuitBreaker) Reset() { *m = CircuitBreaker{} } -func (m *CircuitBreaker) String() string { return proto.CompactTextString(m) } -func (*CircuitBreaker) ProtoMessage() {} -func (*CircuitBreaker) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{3} } +var xxx_messageInfo_CircuitBreaker proto.InternalMessageInfo func (m *CircuitBreaker) GetCloseTimeout() int64 { if m != nil { @@ -560,19 +670,50 @@ func (m *CircuitBreaker) GetSucceedRateToOpen() int32 { // Server is a backend server that provide api type Server struct { - ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` - Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr"` - Protocol Protocol `protobuf:"varint,3,opt,name=protocol,enum=metapb.Protocol" json:"protocol"` - MaxQPS int64 `protobuf:"varint,4,opt,name=maxQPS" json:"maxQPS"` - HeathCheck *HeathCheck `protobuf:"bytes,5,opt,name=heathCheck" json:"heathCheck,omitempty"` - CircuitBreaker *CircuitBreaker `protobuf:"bytes,6,opt,name=circuitBreaker" json:"circuitBreaker,omitempty"` - XXX_unrecognized []byte `json:"-"` + ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` + Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr"` + Protocol Protocol `protobuf:"varint,3,opt,name=protocol,enum=metapb.Protocol" json:"protocol"` + MaxQPS int64 `protobuf:"varint,4,opt,name=maxQPS" json:"maxQPS"` + HeathCheck *HeathCheck `protobuf:"bytes,5,opt,name=heathCheck" json:"heathCheck,omitempty"` + CircuitBreaker *CircuitBreaker `protobuf:"bytes,6,opt,name=circuitBreaker" json:"circuitBreaker,omitempty"` + Weight int64 `protobuf:"varint,7,opt,name=weight" json:"weight"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Server) Reset() { *m = Server{} } +func (m *Server) String() string { return proto.CompactTextString(m) } +func (*Server) ProtoMessage() {} +func (*Server) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{4} +} +func (m *Server) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Server) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Server.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Server) XXX_Merge(src proto.Message) { + xxx_messageInfo_Server.Merge(dst, src) +} +func (m *Server) XXX_Size() int { + return m.Size() +} +func (m *Server) XXX_DiscardUnknown() { + xxx_messageInfo_Server.DiscardUnknown(m) } -func (m *Server) Reset() { *m = Server{} } -func (m *Server) String() string { return proto.CompactTextString(m) } -func (*Server) ProtoMessage() {} -func (*Server) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{4} } +var xxx_messageInfo_Server proto.InternalMessageInfo func (m *Server) GetID() uint64 { if m != nil { @@ -616,17 +757,54 @@ func (m *Server) GetCircuitBreaker() *CircuitBreaker { return nil } +func (m *Server) GetWeight() int64 { + if m != nil { + return m.Weight + } + return 0 +} + // Bind is a bind pair with cluster and server type Bind struct { - ClusterID uint64 `protobuf:"varint,1,opt,name=clusterID" json:"clusterID"` - ServerID uint64 `protobuf:"varint,2,opt,name=serverID" json:"serverID"` - XXX_unrecognized []byte `json:"-"` + ClusterID uint64 `protobuf:"varint,1,opt,name=clusterID" json:"clusterID"` + ServerID uint64 `protobuf:"varint,2,opt,name=serverID" json:"serverID"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *Bind) Reset() { *m = Bind{} } -func (m *Bind) String() string { return proto.CompactTextString(m) } -func (*Bind) ProtoMessage() {} -func (*Bind) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{5} } +func (m *Bind) Reset() { *m = Bind{} } +func (m *Bind) String() string { return proto.CompactTextString(m) } +func (*Bind) ProtoMessage() {} +func (*Bind) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{5} +} +func (m *Bind) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Bind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Bind.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Bind) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bind.Merge(dst, src) +} +func (m *Bind) XXX_Size() int { + return m.Size() +} +func (m *Bind) XXX_DiscardUnknown() { + xxx_messageInfo_Bind.DiscardUnknown(m) +} + +var xxx_messageInfo_Bind proto.InternalMessageInfo func (m *Bind) GetClusterID() uint64 { if m != nil { @@ -644,15 +822,45 @@ func (m *Bind) GetServerID() uint64 { // Pair is pair value type PairValue struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name"` - Value string `protobuf:"bytes,2,opt,name=value" json:"value"` - XXX_unrecognized []byte `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name"` + Value string `protobuf:"bytes,2,opt,name=value" json:"value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *PairValue) Reset() { *m = PairValue{} } -func (m *PairValue) String() string { return proto.CompactTextString(m) } -func (*PairValue) ProtoMessage() {} -func (*PairValue) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{6} } +func (m *PairValue) Reset() { *m = PairValue{} } +func (m *PairValue) String() string { return proto.CompactTextString(m) } +func (*PairValue) ProtoMessage() {} +func (*PairValue) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{6} +} +func (m *PairValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PairValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PairValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PairValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_PairValue.Merge(dst, src) +} +func (m *PairValue) XXX_Size() int { + return m.Size() +} +func (m *PairValue) XXX_DiscardUnknown() { + xxx_messageInfo_PairValue.DiscardUnknown(m) +} + +var xxx_messageInfo_PairValue proto.InternalMessageInfo func (m *PairValue) GetName() string { if m != nil { @@ -670,15 +878,45 @@ func (m *PairValue) GetValue() string { // IPAccessControl is for ip access control type IPAccessControl struct { - Whitelist []string `protobuf:"bytes,1,rep,name=whitelist" json:"whitelist,omitempty"` - Blacklist []string `protobuf:"bytes,2,rep,name=blacklist" json:"blacklist,omitempty"` - XXX_unrecognized []byte `json:"-"` + Whitelist []string `protobuf:"bytes,1,rep,name=whitelist" json:"whitelist,omitempty"` + Blacklist []string `protobuf:"bytes,2,rep,name=blacklist" json:"blacklist,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IPAccessControl) Reset() { *m = IPAccessControl{} } +func (m *IPAccessControl) String() string { return proto.CompactTextString(m) } +func (*IPAccessControl) ProtoMessage() {} +func (*IPAccessControl) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{7} +} +func (m *IPAccessControl) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IPAccessControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IPAccessControl.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *IPAccessControl) XXX_Merge(src proto.Message) { + xxx_messageInfo_IPAccessControl.Merge(dst, src) +} +func (m *IPAccessControl) XXX_Size() int { + return m.Size() +} +func (m *IPAccessControl) XXX_DiscardUnknown() { + xxx_messageInfo_IPAccessControl.DiscardUnknown(m) } -func (m *IPAccessControl) Reset() { *m = IPAccessControl{} } -func (m *IPAccessControl) String() string { return proto.CompactTextString(m) } -func (*IPAccessControl) ProtoMessage() {} -func (*IPAccessControl) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{7} } +var xxx_messageInfo_IPAccessControl proto.InternalMessageInfo func (m *IPAccessControl) GetWhitelist() []string { if m != nil { @@ -696,17 +934,47 @@ func (m *IPAccessControl) GetBlacklist() []string { // HTTPResult is a http result type HTTPResult struct { - Body []byte `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"` - Headers []*PairValue `protobuf:"bytes,2,rep,name=headers" json:"headers,omitempty"` - Cookies []*PairValue `protobuf:"bytes,3,rep,name=cookies" json:"cookies,omitempty"` - Code int32 `protobuf:"varint,4,opt,name=code" json:"code"` - XXX_unrecognized []byte `json:"-"` + Body []byte `protobuf:"bytes,1,opt,name=body" json:"body,omitempty"` + Headers []*PairValue `protobuf:"bytes,2,rep,name=headers" json:"headers,omitempty"` + Cookies []*PairValue `protobuf:"bytes,3,rep,name=cookies" json:"cookies,omitempty"` + Code int32 `protobuf:"varint,4,opt,name=code" json:"code"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *HTTPResult) Reset() { *m = HTTPResult{} } +func (m *HTTPResult) String() string { return proto.CompactTextString(m) } +func (*HTTPResult) ProtoMessage() {} +func (*HTTPResult) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{8} +} +func (m *HTTPResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HTTPResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HTTPResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *HTTPResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_HTTPResult.Merge(dst, src) +} +func (m *HTTPResult) XXX_Size() int { + return m.Size() +} +func (m *HTTPResult) XXX_DiscardUnknown() { + xxx_messageInfo_HTTPResult.DiscardUnknown(m) } -func (m *HTTPResult) Reset() { *m = HTTPResult{} } -func (m *HTTPResult) String() string { return proto.CompactTextString(m) } -func (*HTTPResult) ProtoMessage() {} -func (*HTTPResult) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{8} } +var xxx_messageInfo_HTTPResult proto.InternalMessageInfo func (m *HTTPResult) GetBody() []byte { if m != nil { @@ -738,16 +1006,46 @@ func (m *HTTPResult) GetCode() int32 { // Parameter is a parameter from a http request type Parameter struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name"` - Source Source `protobuf:"varint,2,opt,name=source,enum=metapb.Source" json:"source"` - Index int32 `protobuf:"varint,3,opt,name=index" json:"index"` - XXX_unrecognized []byte `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name"` + Source Source `protobuf:"varint,2,opt,name=source,enum=metapb.Source" json:"source"` + Index int32 `protobuf:"varint,3,opt,name=index" json:"index"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Parameter) Reset() { *m = Parameter{} } +func (m *Parameter) String() string { return proto.CompactTextString(m) } +func (*Parameter) ProtoMessage() {} +func (*Parameter) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{9} +} +func (m *Parameter) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Parameter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Parameter.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Parameter) XXX_Merge(src proto.Message) { + xxx_messageInfo_Parameter.Merge(dst, src) +} +func (m *Parameter) XXX_Size() int { + return m.Size() +} +func (m *Parameter) XXX_DiscardUnknown() { + xxx_messageInfo_Parameter.DiscardUnknown(m) } -func (m *Parameter) Reset() { *m = Parameter{} } -func (m *Parameter) String() string { return proto.CompactTextString(m) } -func (*Parameter) ProtoMessage() {} -func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{9} } +var xxx_messageInfo_Parameter proto.InternalMessageInfo func (m *Parameter) GetName() string { if m != nil { @@ -772,15 +1070,45 @@ func (m *Parameter) GetIndex() int32 { // ValidationRule is a validation rule type ValidationRule struct { - RuleType RuleType `protobuf:"varint,1,opt,name=ruleType,enum=metapb.RuleType" json:"ruleType"` - Expression string `protobuf:"bytes,2,opt,name=expression" json:"expression"` - XXX_unrecognized []byte `json:"-"` + RuleType RuleType `protobuf:"varint,1,opt,name=ruleType,enum=metapb.RuleType" json:"ruleType"` + Expression string `protobuf:"bytes,2,opt,name=expression" json:"expression"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ValidationRule) Reset() { *m = ValidationRule{} } +func (m *ValidationRule) String() string { return proto.CompactTextString(m) } +func (*ValidationRule) ProtoMessage() {} +func (*ValidationRule) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{10} +} +func (m *ValidationRule) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidationRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidationRule.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ValidationRule) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidationRule.Merge(dst, src) +} +func (m *ValidationRule) XXX_Size() int { + return m.Size() +} +func (m *ValidationRule) XXX_DiscardUnknown() { + xxx_messageInfo_ValidationRule.DiscardUnknown(m) } -func (m *ValidationRule) Reset() { *m = ValidationRule{} } -func (m *ValidationRule) String() string { return proto.CompactTextString(m) } -func (*ValidationRule) ProtoMessage() {} -func (*ValidationRule) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{10} } +var xxx_messageInfo_ValidationRule proto.InternalMessageInfo func (m *ValidationRule) GetRuleType() RuleType { if m != nil { @@ -798,16 +1126,46 @@ func (m *ValidationRule) GetExpression() string { // Validation is a validation type Validation struct { - Parameter Parameter `protobuf:"bytes,1,opt,name=parameter" json:"parameter"` - Required bool `protobuf:"varint,2,opt,name=required" json:"required"` - Rules []ValidationRule `protobuf:"bytes,3,rep,name=rules" json:"rules"` - XXX_unrecognized []byte `json:"-"` + Parameter Parameter `protobuf:"bytes,1,opt,name=parameter" json:"parameter"` + Required bool `protobuf:"varint,2,opt,name=required" json:"required"` + Rules []ValidationRule `protobuf:"bytes,3,rep,name=rules" json:"rules"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Validation) Reset() { *m = Validation{} } +func (m *Validation) String() string { return proto.CompactTextString(m) } +func (*Validation) ProtoMessage() {} +func (*Validation) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{11} +} +func (m *Validation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Validation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Validation) XXX_Merge(src proto.Message) { + xxx_messageInfo_Validation.Merge(dst, src) +} +func (m *Validation) XXX_Size() int { + return m.Size() +} +func (m *Validation) XXX_DiscardUnknown() { + xxx_messageInfo_Validation.DiscardUnknown(m) } -func (m *Validation) Reset() { *m = Validation{} } -func (m *Validation) String() string { return proto.CompactTextString(m) } -func (*Validation) ProtoMessage() {} -func (*Validation) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{11} } +var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Validation) GetParameter() Parameter { if m != nil { @@ -832,16 +1190,46 @@ func (m *Validation) GetRules() []ValidationRule { // RetryStrategy retry strategy type RetryStrategy struct { - Interval int32 `protobuf:"varint,1,opt,name=interval" json:"interval"` - MaxTimes int32 `protobuf:"varint,2,opt,name=maxTimes" json:"maxTimes"` - Codes []int32 `protobuf:"varint,3,rep,name=codes" json:"codes,omitempty"` - XXX_unrecognized []byte `json:"-"` + Interval int32 `protobuf:"varint,1,opt,name=interval" json:"interval"` + MaxTimes int32 `protobuf:"varint,2,opt,name=maxTimes" json:"maxTimes"` + Codes []int32 `protobuf:"varint,3,rep,name=codes" json:"codes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetryStrategy) Reset() { *m = RetryStrategy{} } +func (m *RetryStrategy) String() string { return proto.CompactTextString(m) } +func (*RetryStrategy) ProtoMessage() {} +func (*RetryStrategy) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{12} +} +func (m *RetryStrategy) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RetryStrategy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RetryStrategy.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RetryStrategy) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryStrategy.Merge(dst, src) +} +func (m *RetryStrategy) XXX_Size() int { + return m.Size() +} +func (m *RetryStrategy) XXX_DiscardUnknown() { + xxx_messageInfo_RetryStrategy.DiscardUnknown(m) } -func (m *RetryStrategy) Reset() { *m = RetryStrategy{} } -func (m *RetryStrategy) String() string { return proto.CompactTextString(m) } -func (*RetryStrategy) ProtoMessage() {} -func (*RetryStrategy) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{12} } +var xxx_messageInfo_RetryStrategy proto.InternalMessageInfo func (m *RetryStrategy) GetInterval() int32 { if m != nil { @@ -866,24 +1254,54 @@ func (m *RetryStrategy) GetCodes() []int32 { // DispatchNode is the request forward to type DispatchNode struct { - ClusterID uint64 `protobuf:"varint,1,opt,name=clusterID" json:"clusterID"` - URLRewrite string `protobuf:"bytes,2,opt,name=urlRewrite" json:"urlRewrite"` - AttrName string `protobuf:"bytes,3,opt,name=attrName" json:"attrName"` - Validations []*Validation `protobuf:"bytes,4,rep,name=validations" json:"validations,omitempty"` - Cache *Cache `protobuf:"bytes,5,opt,name=cache" json:"cache,omitempty"` - DefaultValue *HTTPResult `protobuf:"bytes,6,opt,name=defaultValue" json:"defaultValue,omitempty"` - UseDefault bool `protobuf:"varint,7,opt,name=useDefault" json:"useDefault"` - BatchIndex int32 `protobuf:"varint,8,opt,name=batchIndex" json:"batchIndex"` - RetryStrategy *RetryStrategy `protobuf:"bytes,9,opt,name=retryStrategy" json:"retryStrategy,omitempty"` - WriteTimeout int64 `protobuf:"varint,10,opt,name=writeTimeout" json:"writeTimeout"` - ReadTimeout int64 `protobuf:"varint,11,opt,name=readTimeout" json:"readTimeout"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *DispatchNode) Reset() { *m = DispatchNode{} } -func (m *DispatchNode) String() string { return proto.CompactTextString(m) } -func (*DispatchNode) ProtoMessage() {} -func (*DispatchNode) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{13} } + ClusterID uint64 `protobuf:"varint,1,opt,name=clusterID" json:"clusterID"` + URLRewrite string `protobuf:"bytes,2,opt,name=urlRewrite" json:"urlRewrite"` + AttrName string `protobuf:"bytes,3,opt,name=attrName" json:"attrName"` + Validations []*Validation `protobuf:"bytes,4,rep,name=validations" json:"validations,omitempty"` + Cache *Cache `protobuf:"bytes,5,opt,name=cache" json:"cache,omitempty"` + DefaultValue *HTTPResult `protobuf:"bytes,6,opt,name=defaultValue" json:"defaultValue,omitempty"` + UseDefault bool `protobuf:"varint,7,opt,name=useDefault" json:"useDefault"` + BatchIndex int32 `protobuf:"varint,8,opt,name=batchIndex" json:"batchIndex"` + RetryStrategy *RetryStrategy `protobuf:"bytes,9,opt,name=retryStrategy" json:"retryStrategy,omitempty"` + WriteTimeout int64 `protobuf:"varint,10,opt,name=writeTimeout" json:"writeTimeout"` + ReadTimeout int64 `protobuf:"varint,11,opt,name=readTimeout" json:"readTimeout"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DispatchNode) Reset() { *m = DispatchNode{} } +func (m *DispatchNode) String() string { return proto.CompactTextString(m) } +func (*DispatchNode) ProtoMessage() {} +func (*DispatchNode) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{13} +} +func (m *DispatchNode) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DispatchNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DispatchNode.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DispatchNode) XXX_Merge(src proto.Message) { + xxx_messageInfo_DispatchNode.Merge(dst, src) +} +func (m *DispatchNode) XXX_Size() int { + return m.Size() +} +func (m *DispatchNode) XXX_DiscardUnknown() { + xxx_messageInfo_DispatchNode.DiscardUnknown(m) +} + +var xxx_messageInfo_DispatchNode proto.InternalMessageInfo func (m *DispatchNode) GetClusterID() uint64 { if m != nil { @@ -964,16 +1382,46 @@ func (m *DispatchNode) GetReadTimeout() int64 { // Cache is used for cache api result type Cache struct { - Keys []Parameter `protobuf:"bytes,1,rep,name=keys" json:"keys"` - Deadline uint64 `protobuf:"varint,2,opt,name=deadline" json:"deadline"` - Conditions []Condition `protobuf:"bytes,3,rep,name=conditions" json:"conditions"` - XXX_unrecognized []byte `json:"-"` + Keys []Parameter `protobuf:"bytes,1,rep,name=keys" json:"keys"` + Deadline uint64 `protobuf:"varint,2,opt,name=deadline" json:"deadline"` + Conditions []Condition `protobuf:"bytes,3,rep,name=conditions" json:"conditions"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Cache) Reset() { *m = Cache{} } +func (m *Cache) String() string { return proto.CompactTextString(m) } +func (*Cache) ProtoMessage() {} +func (*Cache) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{14} +} +func (m *Cache) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Cache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Cache.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Cache) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cache.Merge(dst, src) +} +func (m *Cache) XXX_Size() int { + return m.Size() +} +func (m *Cache) XXX_DiscardUnknown() { + xxx_messageInfo_Cache.DiscardUnknown(m) } -func (m *Cache) Reset() { *m = Cache{} } -func (m *Cache) String() string { return proto.CompactTextString(m) } -func (*Cache) ProtoMessage() {} -func (*Cache) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{14} } +var xxx_messageInfo_Cache proto.InternalMessageInfo func (m *Cache) GetKeys() []Parameter { if m != nil { @@ -998,14 +1446,44 @@ func (m *Cache) GetConditions() []Condition { // RenderTemplate the template that render to client type RenderTemplate struct { - Objects []*RenderObject `protobuf:"bytes,1,rep,name=objects" json:"objects,omitempty"` - XXX_unrecognized []byte `json:"-"` + Objects []*RenderObject `protobuf:"bytes,1,rep,name=objects" json:"objects,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RenderTemplate) Reset() { *m = RenderTemplate{} } +func (m *RenderTemplate) String() string { return proto.CompactTextString(m) } +func (*RenderTemplate) ProtoMessage() {} +func (*RenderTemplate) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{15} +} +func (m *RenderTemplate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RenderTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RenderTemplate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RenderTemplate) XXX_Merge(src proto.Message) { + xxx_messageInfo_RenderTemplate.Merge(dst, src) +} +func (m *RenderTemplate) XXX_Size() int { + return m.Size() +} +func (m *RenderTemplate) XXX_DiscardUnknown() { + xxx_messageInfo_RenderTemplate.DiscardUnknown(m) } -func (m *RenderTemplate) Reset() { *m = RenderTemplate{} } -func (m *RenderTemplate) String() string { return proto.CompactTextString(m) } -func (*RenderTemplate) ProtoMessage() {} -func (*RenderTemplate) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{15} } +var xxx_messageInfo_RenderTemplate proto.InternalMessageInfo func (m *RenderTemplate) GetObjects() []*RenderObject { if m != nil { @@ -1016,16 +1494,46 @@ func (m *RenderTemplate) GetObjects() []*RenderObject { // RenderObject the object in the render template type RenderObject struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name"` - Attrs []*RenderAttr `protobuf:"bytes,2,rep,name=attrs" json:"attrs,omitempty"` - FlatAttrs bool `protobuf:"varint,3,opt,name=flatAttrs" json:"flatAttrs"` - XXX_unrecognized []byte `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name"` + Attrs []*RenderAttr `protobuf:"bytes,2,rep,name=attrs" json:"attrs,omitempty"` + FlatAttrs bool `protobuf:"varint,3,opt,name=flatAttrs" json:"flatAttrs"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RenderObject) Reset() { *m = RenderObject{} } +func (m *RenderObject) String() string { return proto.CompactTextString(m) } +func (*RenderObject) ProtoMessage() {} +func (*RenderObject) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{16} +} +func (m *RenderObject) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RenderObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RenderObject.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RenderObject) XXX_Merge(src proto.Message) { + xxx_messageInfo_RenderObject.Merge(dst, src) +} +func (m *RenderObject) XXX_Size() int { + return m.Size() +} +func (m *RenderObject) XXX_DiscardUnknown() { + xxx_messageInfo_RenderObject.DiscardUnknown(m) } -func (m *RenderObject) Reset() { *m = RenderObject{} } -func (m *RenderObject) String() string { return proto.CompactTextString(m) } -func (*RenderObject) ProtoMessage() {} -func (*RenderObject) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{16} } +var xxx_messageInfo_RenderObject proto.InternalMessageInfo func (m *RenderObject) GetName() string { if m != nil { @@ -1050,15 +1558,45 @@ func (m *RenderObject) GetFlatAttrs() bool { // RenderAttr the attr in the render object type RenderAttr struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name"` - ExtractExp string `protobuf:"bytes,2,opt,name=extractExp" json:"extractExp"` - XXX_unrecognized []byte `json:"-"` + Name string `protobuf:"bytes,1,opt,name=name" json:"name"` + ExtractExp string `protobuf:"bytes,2,opt,name=extractExp" json:"extractExp"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RenderAttr) Reset() { *m = RenderAttr{} } +func (m *RenderAttr) String() string { return proto.CompactTextString(m) } +func (*RenderAttr) ProtoMessage() {} +func (*RenderAttr) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{17} +} +func (m *RenderAttr) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RenderAttr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RenderAttr.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RenderAttr) XXX_Merge(src proto.Message) { + xxx_messageInfo_RenderAttr.Merge(dst, src) +} +func (m *RenderAttr) XXX_Size() int { + return m.Size() +} +func (m *RenderAttr) XXX_DiscardUnknown() { + xxx_messageInfo_RenderAttr.DiscardUnknown(m) } -func (m *RenderAttr) Reset() { *m = RenderAttr{} } -func (m *RenderAttr) String() string { return proto.CompactTextString(m) } -func (*RenderAttr) ProtoMessage() {} -func (*RenderAttr) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{17} } +var xxx_messageInfo_RenderAttr proto.InternalMessageInfo func (m *RenderAttr) GetName() string { if m != nil { @@ -1076,32 +1614,62 @@ func (m *RenderAttr) GetExtractExp() string { // API is the api for dispatcher type API struct { - ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` - Name string `protobuf:"bytes,2,opt,name=name" json:"name"` - URLPattern string `protobuf:"bytes,3,opt,name=urlPattern" json:"urlPattern"` - Method string `protobuf:"bytes,4,opt,name=method" json:"method"` - Domain string `protobuf:"bytes,5,opt,name=domain" json:"domain"` - Status Status `protobuf:"varint,6,opt,name=status,enum=metapb.Status" json:"status"` - IPAccessControl *IPAccessControl `protobuf:"bytes,7,opt,name=ipAccessControl" json:"ipAccessControl,omitempty"` - DefaultValue *HTTPResult `protobuf:"bytes,8,opt,name=defaultValue" json:"defaultValue,omitempty"` - Nodes []*DispatchNode `protobuf:"bytes,9,rep,name=nodes" json:"nodes,omitempty"` - Perms []string `protobuf:"bytes,10,rep,name=perms" json:"perms,omitempty"` - AuthFilter string `protobuf:"bytes,11,opt,name=authFilter" json:"authFilter"` - RenderTemplate *RenderTemplate `protobuf:"bytes,12,opt,name=renderTemplate" json:"renderTemplate,omitempty"` - UseDefault bool `protobuf:"varint,13,opt,name=useDefault" json:"useDefault"` - MatchRule MatchRule `protobuf:"varint,14,opt,name=matchRule,enum=metapb.MatchRule" json:"matchRule"` - Position uint32 `protobuf:"varint,15,opt,name=position" json:"position"` - Tags []*PairValue `protobuf:"bytes,16,rep,name=tags" json:"tags,omitempty"` - WebSocketOptions *WebSocketOptions `protobuf:"bytes,17,opt,name=webSocketOptions" json:"webSocketOptions,omitempty"` - MaxQPS int64 `protobuf:"varint,18,opt,name=maxQPS" json:"maxQPS"` - CircuitBreaker *CircuitBreaker `protobuf:"bytes,19,opt,name=circuitBreaker" json:"circuitBreaker,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *API) Reset() { *m = API{} } -func (m *API) String() string { return proto.CompactTextString(m) } -func (*API) ProtoMessage() {} -func (*API) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{18} } + ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` + Name string `protobuf:"bytes,2,opt,name=name" json:"name"` + URLPattern string `protobuf:"bytes,3,opt,name=urlPattern" json:"urlPattern"` + Method string `protobuf:"bytes,4,opt,name=method" json:"method"` + Domain string `protobuf:"bytes,5,opt,name=domain" json:"domain"` + Status Status `protobuf:"varint,6,opt,name=status,enum=metapb.Status" json:"status"` + IPAccessControl *IPAccessControl `protobuf:"bytes,7,opt,name=ipAccessControl" json:"ipAccessControl,omitempty"` + DefaultValue *HTTPResult `protobuf:"bytes,8,opt,name=defaultValue" json:"defaultValue,omitempty"` + Nodes []*DispatchNode `protobuf:"bytes,9,rep,name=nodes" json:"nodes,omitempty"` + Perms []string `protobuf:"bytes,10,rep,name=perms" json:"perms,omitempty"` + AuthFilter string `protobuf:"bytes,11,opt,name=authFilter" json:"authFilter"` + RenderTemplate *RenderTemplate `protobuf:"bytes,12,opt,name=renderTemplate" json:"renderTemplate,omitempty"` + UseDefault bool `protobuf:"varint,13,opt,name=useDefault" json:"useDefault"` + MatchRule MatchRule `protobuf:"varint,14,opt,name=matchRule,enum=metapb.MatchRule" json:"matchRule"` + Position uint32 `protobuf:"varint,15,opt,name=position" json:"position"` + Tags []*PairValue `protobuf:"bytes,16,rep,name=tags" json:"tags,omitempty"` + WebSocketOptions *WebSocketOptions `protobuf:"bytes,17,opt,name=webSocketOptions" json:"webSocketOptions,omitempty"` + MaxQPS int64 `protobuf:"varint,18,opt,name=maxQPS" json:"maxQPS"` + CircuitBreaker *CircuitBreaker `protobuf:"bytes,19,opt,name=circuitBreaker" json:"circuitBreaker,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *API) Reset() { *m = API{} } +func (m *API) String() string { return proto.CompactTextString(m) } +func (*API) ProtoMessage() {} +func (*API) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{18} +} +func (m *API) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *API) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_API.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *API) XXX_Merge(src proto.Message) { + xxx_messageInfo_API.Merge(dst, src) +} +func (m *API) XXX_Size() int { + return m.Size() +} +func (m *API) XXX_DiscardUnknown() { + xxx_messageInfo_API.DiscardUnknown(m) +} + +var xxx_messageInfo_API proto.InternalMessageInfo func (m *API) GetID() uint64 { if m != nil { @@ -1238,16 +1806,46 @@ func (m *API) GetCircuitBreaker() *CircuitBreaker { // Condition is a condition for routing type Condition struct { - Parameter Parameter `protobuf:"bytes,1,opt,name=parameter" json:"parameter"` - Cmp CMP `protobuf:"varint,2,opt,name=cmp,enum=metapb.CMP" json:"cmp"` - Expect string `protobuf:"bytes,3,opt,name=expect" json:"expect"` - XXX_unrecognized []byte `json:"-"` + Parameter Parameter `protobuf:"bytes,1,opt,name=parameter" json:"parameter"` + Cmp CMP `protobuf:"varint,2,opt,name=cmp,enum=metapb.CMP" json:"cmp"` + Expect string `protobuf:"bytes,3,opt,name=expect" json:"expect"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Condition) Reset() { *m = Condition{} } +func (m *Condition) String() string { return proto.CompactTextString(m) } +func (*Condition) ProtoMessage() {} +func (*Condition) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{19} +} +func (m *Condition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Condition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Condition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Condition) XXX_Merge(src proto.Message) { + xxx_messageInfo_Condition.Merge(dst, src) +} +func (m *Condition) XXX_Size() int { + return m.Size() +} +func (m *Condition) XXX_DiscardUnknown() { + xxx_messageInfo_Condition.DiscardUnknown(m) } -func (m *Condition) Reset() { *m = Condition{} } -func (m *Condition) String() string { return proto.CompactTextString(m) } -func (*Condition) ProtoMessage() {} -func (*Condition) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{19} } +var xxx_messageInfo_Condition proto.InternalMessageInfo func (m *Condition) GetParameter() Parameter { if m != nil { @@ -1272,21 +1870,51 @@ func (m *Condition) GetExpect() string { // Routing is a routing type Routing struct { - ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` - ClusterID uint64 `protobuf:"varint,2,opt,name=clusterID" json:"clusterID"` - Conditions []Condition `protobuf:"bytes,3,rep,name=conditions" json:"conditions"` - Strategy RoutingStrategy `protobuf:"varint,4,opt,name=strategy,enum=metapb.RoutingStrategy" json:"strategy"` - TrafficRate int32 `protobuf:"varint,5,opt,name=trafficRate" json:"trafficRate"` - Status Status `protobuf:"varint,6,opt,name=status,enum=metapb.Status" json:"status"` - API uint64 `protobuf:"varint,7,opt,name=api" json:"api"` - Name string `protobuf:"bytes,8,opt,name=name" json:"name"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Routing) Reset() { *m = Routing{} } -func (m *Routing) String() string { return proto.CompactTextString(m) } -func (*Routing) ProtoMessage() {} -func (*Routing) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{20} } + ID uint64 `protobuf:"varint,1,opt,name=id" json:"id"` + ClusterID uint64 `protobuf:"varint,2,opt,name=clusterID" json:"clusterID"` + Conditions []Condition `protobuf:"bytes,3,rep,name=conditions" json:"conditions"` + Strategy RoutingStrategy `protobuf:"varint,4,opt,name=strategy,enum=metapb.RoutingStrategy" json:"strategy"` + TrafficRate int32 `protobuf:"varint,5,opt,name=trafficRate" json:"trafficRate"` + Status Status `protobuf:"varint,6,opt,name=status,enum=metapb.Status" json:"status"` + API uint64 `protobuf:"varint,7,opt,name=api" json:"api"` + Name string `protobuf:"bytes,8,opt,name=name" json:"name"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Routing) Reset() { *m = Routing{} } +func (m *Routing) String() string { return proto.CompactTextString(m) } +func (*Routing) ProtoMessage() {} +func (*Routing) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{20} +} +func (m *Routing) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Routing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Routing.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Routing) XXX_Merge(src proto.Message) { + xxx_messageInfo_Routing.Merge(dst, src) +} +func (m *Routing) XXX_Size() int { + return m.Size() +} +func (m *Routing) XXX_DiscardUnknown() { + xxx_messageInfo_Routing.DiscardUnknown(m) +} + +var xxx_messageInfo_Routing proto.InternalMessageInfo func (m *Routing) GetID() uint64 { if m != nil { @@ -1346,14 +1974,44 @@ func (m *Routing) GetName() string { // WebSocketOptions websocket options type WebSocketOptions struct { - Origin string `protobuf:"bytes,1,opt,name=origin" json:"origin"` - XXX_unrecognized []byte `json:"-"` + Origin string `protobuf:"bytes,1,opt,name=origin" json:"origin"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *WebSocketOptions) Reset() { *m = WebSocketOptions{} } -func (m *WebSocketOptions) String() string { return proto.CompactTextString(m) } -func (*WebSocketOptions) ProtoMessage() {} -func (*WebSocketOptions) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{21} } +func (m *WebSocketOptions) Reset() { *m = WebSocketOptions{} } +func (m *WebSocketOptions) String() string { return proto.CompactTextString(m) } +func (*WebSocketOptions) ProtoMessage() {} +func (*WebSocketOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{21} +} +func (m *WebSocketOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WebSocketOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WebSocketOptions.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *WebSocketOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_WebSocketOptions.Merge(dst, src) +} +func (m *WebSocketOptions) XXX_Size() int { + return m.Size() +} +func (m *WebSocketOptions) XXX_DiscardUnknown() { + xxx_messageInfo_WebSocketOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_WebSocketOptions proto.InternalMessageInfo func (m *WebSocketOptions) GetOrigin() string { if m != nil { @@ -1364,14 +2022,44 @@ func (m *WebSocketOptions) GetOrigin() string { // System system type System struct { - Count CountMetric `protobuf:"bytes,1,opt,name=count" json:"count"` - XXX_unrecognized []byte `json:"-"` + Count CountMetric `protobuf:"bytes,1,opt,name=count" json:"count"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (m *System) Reset() { *m = System{} } -func (m *System) String() string { return proto.CompactTextString(m) } -func (*System) ProtoMessage() {} -func (*System) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{22} } +func (m *System) Reset() { *m = System{} } +func (m *System) String() string { return proto.CompactTextString(m) } +func (*System) ProtoMessage() {} +func (*System) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{22} +} +func (m *System) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *System) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_System.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *System) XXX_Merge(src proto.Message) { + xxx_messageInfo_System.Merge(dst, src) +} +func (m *System) XXX_Size() int { + return m.Size() +} +func (m *System) XXX_DiscardUnknown() { + xxx_messageInfo_System.DiscardUnknown(m) +} + +var xxx_messageInfo_System proto.InternalMessageInfo func (m *System) GetCount() CountMetric { if m != nil { @@ -1382,17 +2070,47 @@ func (m *System) GetCount() CountMetric { // CountMetric count metric type CountMetric struct { - Cluster int64 `protobuf:"varint,1,opt,name=cluster" json:"cluster"` - Server int64 `protobuf:"varint,2,opt,name=server" json:"server"` - API int64 `protobuf:"varint,3,opt,name=api" json:"api"` - Routing int64 `protobuf:"varint,4,opt,name=Routing" json:"Routing"` - XXX_unrecognized []byte `json:"-"` + Cluster int64 `protobuf:"varint,1,opt,name=cluster" json:"cluster"` + Server int64 `protobuf:"varint,2,opt,name=server" json:"server"` + API int64 `protobuf:"varint,3,opt,name=api" json:"api"` + Routing int64 `protobuf:"varint,4,opt,name=Routing" json:"Routing"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CountMetric) Reset() { *m = CountMetric{} } +func (m *CountMetric) String() string { return proto.CompactTextString(m) } +func (*CountMetric) ProtoMessage() {} +func (*CountMetric) Descriptor() ([]byte, []int) { + return fileDescriptor_metapb_14c347b5dffc2e38, []int{23} +} +func (m *CountMetric) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CountMetric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CountMetric.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CountMetric) XXX_Merge(src proto.Message) { + xxx_messageInfo_CountMetric.Merge(dst, src) +} +func (m *CountMetric) XXX_Size() int { + return m.Size() +} +func (m *CountMetric) XXX_DiscardUnknown() { + xxx_messageInfo_CountMetric.DiscardUnknown(m) } -func (m *CountMetric) Reset() { *m = CountMetric{} } -func (m *CountMetric) String() string { return proto.CompactTextString(m) } -func (*CountMetric) ProtoMessage() {} -func (*CountMetric) Descriptor() ([]byte, []int) { return fileDescriptorMetapb, []int{23} } +var xxx_messageInfo_CountMetric proto.InternalMessageInfo func (m *CountMetric) GetCluster() int64 { if m != nil { @@ -1636,6 +2354,9 @@ func (m *Server) MarshalTo(dAtA []byte) (int, error) { } i += n2 } + dAtA[i] = 0x38 + i++ + i = encodeVarintMetapb(dAtA, i, uint64(m.Weight)) if m.XXX_unrecognized != nil { i += copy(dAtA[i:], m.XXX_unrecognized) } @@ -2530,24 +3251,6 @@ func (m *CountMetric) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeFixed64Metapb(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Metapb(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintMetapb(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -2558,6 +3261,9 @@ func encodeVarintMetapb(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *Proxy) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Addr) @@ -2571,6 +3277,9 @@ func (m *Proxy) Size() (n int) { } func (m *Cluster) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.ID)) @@ -2584,6 +3293,9 @@ func (m *Cluster) Size() (n int) { } func (m *HeathCheck) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Path) @@ -2599,6 +3311,9 @@ func (m *HeathCheck) Size() (n int) { } func (m *CircuitBreaker) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.CloseTimeout)) @@ -2613,6 +3328,9 @@ func (m *CircuitBreaker) Size() (n int) { } func (m *Server) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.ID)) @@ -2628,6 +3346,7 @@ func (m *Server) Size() (n int) { l = m.CircuitBreaker.Size() n += 1 + l + sovMetapb(uint64(l)) } + n += 1 + sovMetapb(uint64(m.Weight)) if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -2635,6 +3354,9 @@ func (m *Server) Size() (n int) { } func (m *Bind) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.ClusterID)) @@ -2646,6 +3368,9 @@ func (m *Bind) Size() (n int) { } func (m *PairValue) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -2659,6 +3384,9 @@ func (m *PairValue) Size() (n int) { } func (m *IPAccessControl) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Whitelist) > 0 { @@ -2680,6 +3408,9 @@ func (m *IPAccessControl) Size() (n int) { } func (m *HTTPResult) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Body != nil { @@ -2706,6 +3437,9 @@ func (m *HTTPResult) Size() (n int) { } func (m *Parameter) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -2719,6 +3453,9 @@ func (m *Parameter) Size() (n int) { } func (m *ValidationRule) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.RuleType)) @@ -2731,6 +3468,9 @@ func (m *ValidationRule) Size() (n int) { } func (m *Validation) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Parameter.Size() @@ -2749,6 +3489,9 @@ func (m *Validation) Size() (n int) { } func (m *RetryStrategy) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.Interval)) @@ -2765,6 +3508,9 @@ func (m *RetryStrategy) Size() (n int) { } func (m *DispatchNode) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.ClusterID)) @@ -2801,6 +3547,9 @@ func (m *DispatchNode) Size() (n int) { } func (m *Cache) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Keys) > 0 { @@ -2823,6 +3572,9 @@ func (m *Cache) Size() (n int) { } func (m *RenderTemplate) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if len(m.Objects) > 0 { @@ -2838,6 +3590,9 @@ func (m *RenderTemplate) Size() (n int) { } func (m *RenderObject) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -2856,6 +3611,9 @@ func (m *RenderObject) Size() (n int) { } func (m *RenderAttr) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Name) @@ -2869,6 +3627,9 @@ func (m *RenderAttr) Size() (n int) { } func (m *API) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.ID)) @@ -2932,6 +3693,9 @@ func (m *API) Size() (n int) { } func (m *Condition) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Parameter.Size() @@ -2946,6 +3710,9 @@ func (m *Condition) Size() (n int) { } func (m *Routing) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.ID)) @@ -2969,6 +3736,9 @@ func (m *Routing) Size() (n int) { } func (m *WebSocketOptions) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Origin) @@ -2980,6 +3750,9 @@ func (m *WebSocketOptions) Size() (n int) { } func (m *System) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Count.Size() @@ -2991,6 +3764,9 @@ func (m *System) Size() (n int) { } func (m *CountMetric) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l n += 1 + sovMetapb(uint64(m.Cluster)) @@ -3717,6 +4493,25 @@ func (m *Server) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + m.Weight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMetapb + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Weight |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipMetapb(dAtA[iNdEx:]) @@ -4666,6 +5461,17 @@ func (m *RetryStrategy) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Codes) == 0 { + m.Codes = make([]int32, 0, elementCount) + } for iNdEx < postIndex { var v int32 for shift := uint(0); ; shift += 7 { @@ -6812,125 +7618,127 @@ var ( ErrIntOverflowMetapb = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("metapb.proto", fileDescriptorMetapb) } +func init() { proto.RegisterFile("metapb.proto", fileDescriptor_metapb_14c347b5dffc2e38) } -var fileDescriptorMetapb = []byte{ - // 1872 bytes of a gzipped FileDescriptorProto +var fileDescriptor_metapb_14c347b5dffc2e38 = []byte{ + // 1895 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4d, 0x8f, 0x1b, 0x49, - 0x19, 0x9e, 0xf6, 0xd7, 0xd8, 0xaf, 0x67, 0x3c, 0x9d, 0x4a, 0x60, 0xad, 0x08, 0x26, 0x51, 0x2f, - 0x84, 0xc1, 0x8b, 0xb2, 0xc8, 0xda, 0x15, 0x0a, 0x8b, 0x10, 0x63, 0x3b, 0xbb, 0x31, 0x9a, 0x49, - 0x9c, 0xb6, 0xb3, 0x2b, 0x21, 0x2e, 0xe5, 0xee, 0x1a, 0xbb, 0x76, 0xda, 0x5d, 0x4d, 0x75, 0xf5, - 0x64, 0x2c, 0x71, 0x84, 0x0b, 0x42, 0xe2, 0xc2, 0x01, 0xfe, 0xd1, 0x1e, 0x38, 0xe4, 0x17, 0x44, - 0x30, 0x88, 0x7f, 0xc1, 0x01, 0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x84, 0x5f, 0xe0, 0x48, 0xad, - 0xa0, 0x6a, 0x28, 0x65, 0x93, 0x74, 0x86, 0xa0, 0x2b, 0xc2, 0x32, 0xd1, 0xad, 0x15, 0x58, 0x16, - 0xf4, 0xfe, 0x50, 0x81, 0xce, 0x90, 0xf2, 0x20, 0xa3, 0x62, 0xc0, 0x09, 0x3e, 0x27, 0x1c, 0x1d, - 0xc1, 0x5e, 0x10, 0xb1, 0x94, 0xcc, 0xcc, 0x38, 0xa7, 0x30, 0xae, 0x64, 0x41, 0x0f, 0xe1, 0x60, - 0x89, 0xa3, 0xb3, 0x19, 0xc7, 0x67, 0x67, 0x34, 0xf0, 0xb1, 0xd0, 0xde, 0xaa, 0x1b, 0xf2, 0xb6, - 0x51, 0xf2, 0x39, 0x16, 0x44, 0xed, 0x7c, 0x42, 0x38, 0x65, 0x61, 0x69, 0xe9, 0xdb, 0x46, 0xf4, - 0x09, 0xa0, 0x33, 0x4c, 0xa3, 0x8c, 0x13, 0x39, 0x7c, 0xc6, 0x86, 0x72, 0x72, 0xb5, 0x0f, 0x3b, - 0xc5, 0x0d, 0x76, 0xd4, 0x87, 0x5b, 0x69, 0x16, 0x04, 0x84, 0x84, 0x1a, 0x7d, 0x96, 0x90, 0xb8, - 0x5b, 0x2f, 0x0c, 0xba, 0x6e, 0x96, 0x6e, 0x68, 0x4c, 0x09, 0xbf, 0xf8, 0xff, 0x39, 0xa1, 0x92, - 0xae, 0x72, 0x2d, 0xe9, 0xfa, 0xd0, 0x54, 0x09, 0x1a, 0xb0, 0xc8, 0x24, 0x84, 0x6b, 0x13, 0x62, - 0x62, 0x70, 0xc3, 0xcf, 0x79, 0xe8, 0x7b, 0xd0, 0x58, 0xe1, 0xcb, 0xe7, 0x93, 0x69, 0x29, 0x34, - 0x06, 0x43, 0x7d, 0x80, 0x65, 0x9e, 0x27, 0x6a, 0xfd, 0xed, 0x3e, 0xb2, 0xdf, 0xdc, 0x64, 0x90, - 0x5f, 0x60, 0xa1, 0x5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fa, 0xef, 0x83, 0xad, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x63, + 0x02, 0xa5, 0x11, 0xef, 0x12, 0x00, 0x00, } diff --git a/pkg/pb/metapb/metapb.proto b/pkg/pb/metapb/metapb.proto index 71936d7d..d3ae72b2 100644 --- a/pkg/pb/metapb/metapb.proto +++ b/pkg/pb/metapb/metapb.proto @@ -26,6 +26,7 @@ enum CircuitStatus { enum LoadBalance { RoundRobin = 0; IPHash = 1; + WightRobin = 2; } // Protocol is the protocol of the backend api @@ -108,6 +109,7 @@ message Server { optional int64 maxQPS = 4 [(gogoproto.nullable) = false]; optional HeathCheck heathCheck = 5; optional CircuitBreaker circuitBreaker = 6; + optional int64 weight = 7 [(gogoproto.nullable) = false]; } // Bind is a bind pair with cluster and server diff --git a/pkg/pb/rpcpb/rpcpb.pb.go b/pkg/pb/rpcpb/rpcpb.pb.go index b57c9621..9ae499c4 100644 --- a/pkg/pb/rpcpb/rpcpb.pb.go +++ b/pkg/pb/rpcpb/rpcpb.pb.go @@ -1,58 +1,6 @@ -// Code generated by protoc-gen-gogo. +// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: rpcpb.proto -// DO NOT EDIT! - -/* - Package rpcpb is a generated protocol buffer package. - - It is generated from these files: - rpcpb.proto - - It has these top-level messages: - RpcHeader - PutClusterReq - PutClusterRsp - RemoveClusterReq - RemoveClusterRsp - GetClusterReq - GetClusterRsp - GetClusterListReq - PutServerReq - PutServerRsp - RemoveServerReq - RemoveServerRsp - GetServerReq - GetServerRsp - GetServerListReq - PutAPIReq - PutAPIRsp - RemoveAPIReq - RemoveAPIRsp - GetAPIReq - GetAPIRsp - GetAPIListReq - PutRoutingReq - PutRoutingRsp - RemoveRoutingReq - RemoveRoutingRsp - GetRoutingReq - GetRoutingRsp - GetRoutingListReq - AddBindReq - AddBindRsp - RemoveBindReq - RemoveBindRsp - RemoveClusterBindReq - RemoveClusterBindRsp - GetBindServersReq - GetBindServersRsp - CleanReq - CleanRsp - SetIDReq - SetIDRsp - BatchReq - BatchRsp -*/ + package rpcpb import ( @@ -62,6 +10,8 @@ import ( math "math" + _ "github.com/gogo/protobuf/gogoproto" + metapb "github.com/fagongzi/gateway/pkg/pb/metapb" context "golang.org/x/net/context" @@ -84,14 +34,44 @@ const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // RpcHeader is the header for all rpc request and response type RpcHeader struct { - Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid"` - XXX_unrecognized []byte `json:"-"` + Uuid string `protobuf:"bytes,1,opt,name=uuid" json:"uuid"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RpcHeader) Reset() { *m = RpcHeader{} } +func (m *RpcHeader) String() string { return proto.CompactTextString(m) } +func (*RpcHeader) ProtoMessage() {} +func (*RpcHeader) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{0} +} +func (m *RpcHeader) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcHeader.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RpcHeader) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcHeader.Merge(dst, src) +} +func (m *RpcHeader) XXX_Size() int { + return m.Size() +} +func (m *RpcHeader) XXX_DiscardUnknown() { + xxx_messageInfo_RpcHeader.DiscardUnknown(m) } -func (m *RpcHeader) Reset() { *m = RpcHeader{} } -func (m *RpcHeader) String() string { return proto.CompactTextString(m) } -func (*RpcHeader) ProtoMessage() {} -func (*RpcHeader) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{0} } +var xxx_messageInfo_RpcHeader proto.InternalMessageInfo func (m *RpcHeader) GetUuid() string { if m != nil { @@ -101,15 +81,45 @@ func (m *RpcHeader) GetUuid() string { } type PutClusterReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Cluster metapb.Cluster `protobuf:"bytes,2,opt,name=cluster" json:"cluster"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Cluster metapb.Cluster `protobuf:"bytes,2,opt,name=cluster" json:"cluster"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutClusterReq) Reset() { *m = PutClusterReq{} } +func (m *PutClusterReq) String() string { return proto.CompactTextString(m) } +func (*PutClusterReq) ProtoMessage() {} +func (*PutClusterReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{1} +} +func (m *PutClusterReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutClusterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutClusterReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PutClusterReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutClusterReq.Merge(dst, src) +} +func (m *PutClusterReq) XXX_Size() int { + return m.Size() +} +func (m *PutClusterReq) XXX_DiscardUnknown() { + xxx_messageInfo_PutClusterReq.DiscardUnknown(m) } -func (m *PutClusterReq) Reset() { *m = PutClusterReq{} } -func (m *PutClusterReq) String() string { return proto.CompactTextString(m) } -func (*PutClusterReq) ProtoMessage() {} -func (*PutClusterReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{1} } +var xxx_messageInfo_PutClusterReq proto.InternalMessageInfo func (m *PutClusterReq) GetHeader() RpcHeader { if m != nil { @@ -126,15 +136,45 @@ func (m *PutClusterReq) GetCluster() metapb.Cluster { } type PutClusterRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutClusterRsp) Reset() { *m = PutClusterRsp{} } +func (m *PutClusterRsp) String() string { return proto.CompactTextString(m) } +func (*PutClusterRsp) ProtoMessage() {} +func (*PutClusterRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{2} +} +func (m *PutClusterRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutClusterRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutClusterRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PutClusterRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutClusterRsp.Merge(dst, src) +} +func (m *PutClusterRsp) XXX_Size() int { + return m.Size() +} +func (m *PutClusterRsp) XXX_DiscardUnknown() { + xxx_messageInfo_PutClusterRsp.DiscardUnknown(m) } -func (m *PutClusterRsp) Reset() { *m = PutClusterRsp{} } -func (m *PutClusterRsp) String() string { return proto.CompactTextString(m) } -func (*PutClusterRsp) ProtoMessage() {} -func (*PutClusterRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{2} } +var xxx_messageInfo_PutClusterRsp proto.InternalMessageInfo func (m *PutClusterRsp) GetHeader() RpcHeader { if m != nil { @@ -151,15 +191,45 @@ func (m *PutClusterRsp) GetID() uint64 { } type RemoveClusterReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveClusterReq) Reset() { *m = RemoveClusterReq{} } +func (m *RemoveClusterReq) String() string { return proto.CompactTextString(m) } +func (*RemoveClusterReq) ProtoMessage() {} +func (*RemoveClusterReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{3} +} +func (m *RemoveClusterReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveClusterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveClusterReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveClusterReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveClusterReq.Merge(dst, src) +} +func (m *RemoveClusterReq) XXX_Size() int { + return m.Size() +} +func (m *RemoveClusterReq) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveClusterReq.DiscardUnknown(m) } -func (m *RemoveClusterReq) Reset() { *m = RemoveClusterReq{} } -func (m *RemoveClusterReq) String() string { return proto.CompactTextString(m) } -func (*RemoveClusterReq) ProtoMessage() {} -func (*RemoveClusterReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{3} } +var xxx_messageInfo_RemoveClusterReq proto.InternalMessageInfo func (m *RemoveClusterReq) GetHeader() RpcHeader { if m != nil { @@ -176,14 +246,44 @@ func (m *RemoveClusterReq) GetID() uint64 { } type RemoveClusterRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveClusterRsp) Reset() { *m = RemoveClusterRsp{} } +func (m *RemoveClusterRsp) String() string { return proto.CompactTextString(m) } +func (*RemoveClusterRsp) ProtoMessage() {} +func (*RemoveClusterRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{4} +} +func (m *RemoveClusterRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveClusterRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveClusterRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveClusterRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveClusterRsp.Merge(dst, src) +} +func (m *RemoveClusterRsp) XXX_Size() int { + return m.Size() +} +func (m *RemoveClusterRsp) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveClusterRsp.DiscardUnknown(m) } -func (m *RemoveClusterRsp) Reset() { *m = RemoveClusterRsp{} } -func (m *RemoveClusterRsp) String() string { return proto.CompactTextString(m) } -func (*RemoveClusterRsp) ProtoMessage() {} -func (*RemoveClusterRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{4} } +var xxx_messageInfo_RemoveClusterRsp proto.InternalMessageInfo func (m *RemoveClusterRsp) GetHeader() RpcHeader { if m != nil { @@ -193,15 +293,45 @@ func (m *RemoveClusterRsp) GetHeader() RpcHeader { } type GetClusterReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetClusterReq) Reset() { *m = GetClusterReq{} } +func (m *GetClusterReq) String() string { return proto.CompactTextString(m) } +func (*GetClusterReq) ProtoMessage() {} +func (*GetClusterReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{5} +} +func (m *GetClusterReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetClusterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetClusterReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetClusterReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetClusterReq.Merge(dst, src) +} +func (m *GetClusterReq) XXX_Size() int { + return m.Size() +} +func (m *GetClusterReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetClusterReq.DiscardUnknown(m) } -func (m *GetClusterReq) Reset() { *m = GetClusterReq{} } -func (m *GetClusterReq) String() string { return proto.CompactTextString(m) } -func (*GetClusterReq) ProtoMessage() {} -func (*GetClusterReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{5} } +var xxx_messageInfo_GetClusterReq proto.InternalMessageInfo func (m *GetClusterReq) GetHeader() RpcHeader { if m != nil { @@ -218,15 +348,45 @@ func (m *GetClusterReq) GetID() uint64 { } type GetClusterRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Cluster *metapb.Cluster `protobuf:"bytes,2,opt,name=cluster" json:"cluster,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Cluster *metapb.Cluster `protobuf:"bytes,2,opt,name=cluster" json:"cluster,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetClusterRsp) Reset() { *m = GetClusterRsp{} } +func (m *GetClusterRsp) String() string { return proto.CompactTextString(m) } +func (*GetClusterRsp) ProtoMessage() {} +func (*GetClusterRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{6} +} +func (m *GetClusterRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetClusterRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetClusterRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetClusterRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetClusterRsp.Merge(dst, src) +} +func (m *GetClusterRsp) XXX_Size() int { + return m.Size() +} +func (m *GetClusterRsp) XXX_DiscardUnknown() { + xxx_messageInfo_GetClusterRsp.DiscardUnknown(m) } -func (m *GetClusterRsp) Reset() { *m = GetClusterRsp{} } -func (m *GetClusterRsp) String() string { return proto.CompactTextString(m) } -func (*GetClusterRsp) ProtoMessage() {} -func (*GetClusterRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{6} } +var xxx_messageInfo_GetClusterRsp proto.InternalMessageInfo func (m *GetClusterRsp) GetHeader() RpcHeader { if m != nil { @@ -243,14 +403,44 @@ func (m *GetClusterRsp) GetCluster() *metapb.Cluster { } type GetClusterListReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetClusterListReq) Reset() { *m = GetClusterListReq{} } +func (m *GetClusterListReq) String() string { return proto.CompactTextString(m) } +func (*GetClusterListReq) ProtoMessage() {} +func (*GetClusterListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{7} +} +func (m *GetClusterListReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetClusterListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetClusterListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetClusterListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetClusterListReq.Merge(dst, src) +} +func (m *GetClusterListReq) XXX_Size() int { + return m.Size() +} +func (m *GetClusterListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetClusterListReq.DiscardUnknown(m) } -func (m *GetClusterListReq) Reset() { *m = GetClusterListReq{} } -func (m *GetClusterListReq) String() string { return proto.CompactTextString(m) } -func (*GetClusterListReq) ProtoMessage() {} -func (*GetClusterListReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{7} } +var xxx_messageInfo_GetClusterListReq proto.InternalMessageInfo func (m *GetClusterListReq) GetHeader() RpcHeader { if m != nil { @@ -260,15 +450,45 @@ func (m *GetClusterListReq) GetHeader() RpcHeader { } type PutServerReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Server metapb.Server `protobuf:"bytes,2,opt,name=server" json:"server"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Server metapb.Server `protobuf:"bytes,2,opt,name=server" json:"server"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutServerReq) Reset() { *m = PutServerReq{} } +func (m *PutServerReq) String() string { return proto.CompactTextString(m) } +func (*PutServerReq) ProtoMessage() {} +func (*PutServerReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{8} +} +func (m *PutServerReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutServerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutServerReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PutServerReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutServerReq.Merge(dst, src) +} +func (m *PutServerReq) XXX_Size() int { + return m.Size() +} +func (m *PutServerReq) XXX_DiscardUnknown() { + xxx_messageInfo_PutServerReq.DiscardUnknown(m) } -func (m *PutServerReq) Reset() { *m = PutServerReq{} } -func (m *PutServerReq) String() string { return proto.CompactTextString(m) } -func (*PutServerReq) ProtoMessage() {} -func (*PutServerReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{8} } +var xxx_messageInfo_PutServerReq proto.InternalMessageInfo func (m *PutServerReq) GetHeader() RpcHeader { if m != nil { @@ -285,15 +505,45 @@ func (m *PutServerReq) GetServer() metapb.Server { } type PutServerRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutServerRsp) Reset() { *m = PutServerRsp{} } +func (m *PutServerRsp) String() string { return proto.CompactTextString(m) } +func (*PutServerRsp) ProtoMessage() {} +func (*PutServerRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{9} +} +func (m *PutServerRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutServerRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutServerRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PutServerRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutServerRsp.Merge(dst, src) +} +func (m *PutServerRsp) XXX_Size() int { + return m.Size() +} +func (m *PutServerRsp) XXX_DiscardUnknown() { + xxx_messageInfo_PutServerRsp.DiscardUnknown(m) } -func (m *PutServerRsp) Reset() { *m = PutServerRsp{} } -func (m *PutServerRsp) String() string { return proto.CompactTextString(m) } -func (*PutServerRsp) ProtoMessage() {} -func (*PutServerRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{9} } +var xxx_messageInfo_PutServerRsp proto.InternalMessageInfo func (m *PutServerRsp) GetHeader() RpcHeader { if m != nil { @@ -310,15 +560,45 @@ func (m *PutServerRsp) GetID() uint64 { } type RemoveServerReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveServerReq) Reset() { *m = RemoveServerReq{} } +func (m *RemoveServerReq) String() string { return proto.CompactTextString(m) } +func (*RemoveServerReq) ProtoMessage() {} +func (*RemoveServerReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{10} +} +func (m *RemoveServerReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveServerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveServerReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveServerReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveServerReq.Merge(dst, src) +} +func (m *RemoveServerReq) XXX_Size() int { + return m.Size() +} +func (m *RemoveServerReq) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveServerReq.DiscardUnknown(m) } -func (m *RemoveServerReq) Reset() { *m = RemoveServerReq{} } -func (m *RemoveServerReq) String() string { return proto.CompactTextString(m) } -func (*RemoveServerReq) ProtoMessage() {} -func (*RemoveServerReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{10} } +var xxx_messageInfo_RemoveServerReq proto.InternalMessageInfo func (m *RemoveServerReq) GetHeader() RpcHeader { if m != nil { @@ -335,14 +615,44 @@ func (m *RemoveServerReq) GetID() uint64 { } type RemoveServerRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveServerRsp) Reset() { *m = RemoveServerRsp{} } +func (m *RemoveServerRsp) String() string { return proto.CompactTextString(m) } +func (*RemoveServerRsp) ProtoMessage() {} +func (*RemoveServerRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{11} +} +func (m *RemoveServerRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveServerRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveServerRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveServerRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveServerRsp.Merge(dst, src) +} +func (m *RemoveServerRsp) XXX_Size() int { + return m.Size() +} +func (m *RemoveServerRsp) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveServerRsp.DiscardUnknown(m) } -func (m *RemoveServerRsp) Reset() { *m = RemoveServerRsp{} } -func (m *RemoveServerRsp) String() string { return proto.CompactTextString(m) } -func (*RemoveServerRsp) ProtoMessage() {} -func (*RemoveServerRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{11} } +var xxx_messageInfo_RemoveServerRsp proto.InternalMessageInfo func (m *RemoveServerRsp) GetHeader() RpcHeader { if m != nil { @@ -352,15 +662,45 @@ func (m *RemoveServerRsp) GetHeader() RpcHeader { } type GetServerReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetServerReq) Reset() { *m = GetServerReq{} } +func (m *GetServerReq) String() string { return proto.CompactTextString(m) } +func (*GetServerReq) ProtoMessage() {} +func (*GetServerReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{12} +} +func (m *GetServerReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetServerReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetServerReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetServerReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetServerReq.Merge(dst, src) +} +func (m *GetServerReq) XXX_Size() int { + return m.Size() +} +func (m *GetServerReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetServerReq.DiscardUnknown(m) } -func (m *GetServerReq) Reset() { *m = GetServerReq{} } -func (m *GetServerReq) String() string { return proto.CompactTextString(m) } -func (*GetServerReq) ProtoMessage() {} -func (*GetServerReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{12} } +var xxx_messageInfo_GetServerReq proto.InternalMessageInfo func (m *GetServerReq) GetHeader() RpcHeader { if m != nil { @@ -377,15 +717,45 @@ func (m *GetServerReq) GetID() uint64 { } type GetServerRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Server *metapb.Server `protobuf:"bytes,2,opt,name=server" json:"server,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Server *metapb.Server `protobuf:"bytes,2,opt,name=server" json:"server,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetServerRsp) Reset() { *m = GetServerRsp{} } +func (m *GetServerRsp) String() string { return proto.CompactTextString(m) } +func (*GetServerRsp) ProtoMessage() {} +func (*GetServerRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{13} +} +func (m *GetServerRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetServerRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetServerRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetServerRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetServerRsp.Merge(dst, src) +} +func (m *GetServerRsp) XXX_Size() int { + return m.Size() +} +func (m *GetServerRsp) XXX_DiscardUnknown() { + xxx_messageInfo_GetServerRsp.DiscardUnknown(m) } -func (m *GetServerRsp) Reset() { *m = GetServerRsp{} } -func (m *GetServerRsp) String() string { return proto.CompactTextString(m) } -func (*GetServerRsp) ProtoMessage() {} -func (*GetServerRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{13} } +var xxx_messageInfo_GetServerRsp proto.InternalMessageInfo func (m *GetServerRsp) GetHeader() RpcHeader { if m != nil { @@ -402,14 +772,44 @@ func (m *GetServerRsp) GetServer() *metapb.Server { } type GetServerListReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetServerListReq) Reset() { *m = GetServerListReq{} } +func (m *GetServerListReq) String() string { return proto.CompactTextString(m) } +func (*GetServerListReq) ProtoMessage() {} +func (*GetServerListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{14} +} +func (m *GetServerListReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetServerListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetServerListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetServerListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetServerListReq.Merge(dst, src) +} +func (m *GetServerListReq) XXX_Size() int { + return m.Size() +} +func (m *GetServerListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetServerListReq.DiscardUnknown(m) } -func (m *GetServerListReq) Reset() { *m = GetServerListReq{} } -func (m *GetServerListReq) String() string { return proto.CompactTextString(m) } -func (*GetServerListReq) ProtoMessage() {} -func (*GetServerListReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{14} } +var xxx_messageInfo_GetServerListReq proto.InternalMessageInfo func (m *GetServerListReq) GetHeader() RpcHeader { if m != nil { @@ -419,15 +819,45 @@ func (m *GetServerListReq) GetHeader() RpcHeader { } type PutAPIReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - API metapb.API `protobuf:"bytes,2,opt,name=api" json:"api"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + API metapb.API `protobuf:"bytes,2,opt,name=api" json:"api"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutAPIReq) Reset() { *m = PutAPIReq{} } +func (m *PutAPIReq) String() string { return proto.CompactTextString(m) } +func (*PutAPIReq) ProtoMessage() {} +func (*PutAPIReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{15} +} +func (m *PutAPIReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutAPIReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutAPIReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PutAPIReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutAPIReq.Merge(dst, src) +} +func (m *PutAPIReq) XXX_Size() int { + return m.Size() +} +func (m *PutAPIReq) XXX_DiscardUnknown() { + xxx_messageInfo_PutAPIReq.DiscardUnknown(m) } -func (m *PutAPIReq) Reset() { *m = PutAPIReq{} } -func (m *PutAPIReq) String() string { return proto.CompactTextString(m) } -func (*PutAPIReq) ProtoMessage() {} -func (*PutAPIReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{15} } +var xxx_messageInfo_PutAPIReq proto.InternalMessageInfo func (m *PutAPIReq) GetHeader() RpcHeader { if m != nil { @@ -444,15 +874,45 @@ func (m *PutAPIReq) GetAPI() metapb.API { } type PutAPIRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutAPIRsp) Reset() { *m = PutAPIRsp{} } +func (m *PutAPIRsp) String() string { return proto.CompactTextString(m) } +func (*PutAPIRsp) ProtoMessage() {} +func (*PutAPIRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{16} +} +func (m *PutAPIRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutAPIRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutAPIRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PutAPIRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutAPIRsp.Merge(dst, src) +} +func (m *PutAPIRsp) XXX_Size() int { + return m.Size() +} +func (m *PutAPIRsp) XXX_DiscardUnknown() { + xxx_messageInfo_PutAPIRsp.DiscardUnknown(m) } -func (m *PutAPIRsp) Reset() { *m = PutAPIRsp{} } -func (m *PutAPIRsp) String() string { return proto.CompactTextString(m) } -func (*PutAPIRsp) ProtoMessage() {} -func (*PutAPIRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{16} } +var xxx_messageInfo_PutAPIRsp proto.InternalMessageInfo func (m *PutAPIRsp) GetHeader() RpcHeader { if m != nil { @@ -469,15 +929,45 @@ func (m *PutAPIRsp) GetID() uint64 { } type RemoveAPIReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveAPIReq) Reset() { *m = RemoveAPIReq{} } +func (m *RemoveAPIReq) String() string { return proto.CompactTextString(m) } +func (*RemoveAPIReq) ProtoMessage() {} +func (*RemoveAPIReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{17} +} +func (m *RemoveAPIReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveAPIReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveAPIReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveAPIReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveAPIReq.Merge(dst, src) +} +func (m *RemoveAPIReq) XXX_Size() int { + return m.Size() +} +func (m *RemoveAPIReq) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveAPIReq.DiscardUnknown(m) } -func (m *RemoveAPIReq) Reset() { *m = RemoveAPIReq{} } -func (m *RemoveAPIReq) String() string { return proto.CompactTextString(m) } -func (*RemoveAPIReq) ProtoMessage() {} -func (*RemoveAPIReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{17} } +var xxx_messageInfo_RemoveAPIReq proto.InternalMessageInfo func (m *RemoveAPIReq) GetHeader() RpcHeader { if m != nil { @@ -494,14 +984,44 @@ func (m *RemoveAPIReq) GetID() uint64 { } type RemoveAPIRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveAPIRsp) Reset() { *m = RemoveAPIRsp{} } +func (m *RemoveAPIRsp) String() string { return proto.CompactTextString(m) } +func (*RemoveAPIRsp) ProtoMessage() {} +func (*RemoveAPIRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{18} +} +func (m *RemoveAPIRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveAPIRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveAPIRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveAPIRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveAPIRsp.Merge(dst, src) +} +func (m *RemoveAPIRsp) XXX_Size() int { + return m.Size() +} +func (m *RemoveAPIRsp) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveAPIRsp.DiscardUnknown(m) } -func (m *RemoveAPIRsp) Reset() { *m = RemoveAPIRsp{} } -func (m *RemoveAPIRsp) String() string { return proto.CompactTextString(m) } -func (*RemoveAPIRsp) ProtoMessage() {} -func (*RemoveAPIRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{18} } +var xxx_messageInfo_RemoveAPIRsp proto.InternalMessageInfo func (m *RemoveAPIRsp) GetHeader() RpcHeader { if m != nil { @@ -511,15 +1031,45 @@ func (m *RemoveAPIRsp) GetHeader() RpcHeader { } type GetAPIReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAPIReq) Reset() { *m = GetAPIReq{} } +func (m *GetAPIReq) String() string { return proto.CompactTextString(m) } +func (*GetAPIReq) ProtoMessage() {} +func (*GetAPIReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{19} +} +func (m *GetAPIReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAPIReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAPIReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAPIReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAPIReq.Merge(dst, src) +} +func (m *GetAPIReq) XXX_Size() int { + return m.Size() +} +func (m *GetAPIReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetAPIReq.DiscardUnknown(m) } -func (m *GetAPIReq) Reset() { *m = GetAPIReq{} } -func (m *GetAPIReq) String() string { return proto.CompactTextString(m) } -func (*GetAPIReq) ProtoMessage() {} -func (*GetAPIReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{19} } +var xxx_messageInfo_GetAPIReq proto.InternalMessageInfo func (m *GetAPIReq) GetHeader() RpcHeader { if m != nil { @@ -536,15 +1086,45 @@ func (m *GetAPIReq) GetID() uint64 { } type GetAPIRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - API *metapb.API `protobuf:"bytes,2,opt,name=api" json:"api,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + API *metapb.API `protobuf:"bytes,2,opt,name=api" json:"api,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAPIRsp) Reset() { *m = GetAPIRsp{} } +func (m *GetAPIRsp) String() string { return proto.CompactTextString(m) } +func (*GetAPIRsp) ProtoMessage() {} +func (*GetAPIRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{20} +} +func (m *GetAPIRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAPIRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAPIRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAPIRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAPIRsp.Merge(dst, src) +} +func (m *GetAPIRsp) XXX_Size() int { + return m.Size() +} +func (m *GetAPIRsp) XXX_DiscardUnknown() { + xxx_messageInfo_GetAPIRsp.DiscardUnknown(m) } -func (m *GetAPIRsp) Reset() { *m = GetAPIRsp{} } -func (m *GetAPIRsp) String() string { return proto.CompactTextString(m) } -func (*GetAPIRsp) ProtoMessage() {} -func (*GetAPIRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{20} } +var xxx_messageInfo_GetAPIRsp proto.InternalMessageInfo func (m *GetAPIRsp) GetHeader() RpcHeader { if m != nil { @@ -561,14 +1141,44 @@ func (m *GetAPIRsp) GetAPI() *metapb.API { } type GetAPIListReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAPIListReq) Reset() { *m = GetAPIListReq{} } +func (m *GetAPIListReq) String() string { return proto.CompactTextString(m) } +func (*GetAPIListReq) ProtoMessage() {} +func (*GetAPIListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{21} +} +func (m *GetAPIListReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetAPIListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetAPIListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetAPIListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAPIListReq.Merge(dst, src) +} +func (m *GetAPIListReq) XXX_Size() int { + return m.Size() +} +func (m *GetAPIListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetAPIListReq.DiscardUnknown(m) } -func (m *GetAPIListReq) Reset() { *m = GetAPIListReq{} } -func (m *GetAPIListReq) String() string { return proto.CompactTextString(m) } -func (*GetAPIListReq) ProtoMessage() {} -func (*GetAPIListReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{21} } +var xxx_messageInfo_GetAPIListReq proto.InternalMessageInfo func (m *GetAPIListReq) GetHeader() RpcHeader { if m != nil { @@ -578,15 +1188,45 @@ func (m *GetAPIListReq) GetHeader() RpcHeader { } type PutRoutingReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Routing metapb.Routing `protobuf:"bytes,2,opt,name=routing" json:"routing"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Routing metapb.Routing `protobuf:"bytes,2,opt,name=routing" json:"routing"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutRoutingReq) Reset() { *m = PutRoutingReq{} } +func (m *PutRoutingReq) String() string { return proto.CompactTextString(m) } +func (*PutRoutingReq) ProtoMessage() {} +func (*PutRoutingReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{22} +} +func (m *PutRoutingReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutRoutingReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutRoutingReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PutRoutingReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRoutingReq.Merge(dst, src) +} +func (m *PutRoutingReq) XXX_Size() int { + return m.Size() +} +func (m *PutRoutingReq) XXX_DiscardUnknown() { + xxx_messageInfo_PutRoutingReq.DiscardUnknown(m) } -func (m *PutRoutingReq) Reset() { *m = PutRoutingReq{} } -func (m *PutRoutingReq) String() string { return proto.CompactTextString(m) } -func (*PutRoutingReq) ProtoMessage() {} -func (*PutRoutingReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{22} } +var xxx_messageInfo_PutRoutingReq proto.InternalMessageInfo func (m *PutRoutingReq) GetHeader() RpcHeader { if m != nil { @@ -603,15 +1243,45 @@ func (m *PutRoutingReq) GetRouting() metapb.Routing { } type PutRoutingRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PutRoutingRsp) Reset() { *m = PutRoutingRsp{} } +func (m *PutRoutingRsp) String() string { return proto.CompactTextString(m) } +func (*PutRoutingRsp) ProtoMessage() {} +func (*PutRoutingRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{23} +} +func (m *PutRoutingRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PutRoutingRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PutRoutingRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *PutRoutingRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_PutRoutingRsp.Merge(dst, src) +} +func (m *PutRoutingRsp) XXX_Size() int { + return m.Size() +} +func (m *PutRoutingRsp) XXX_DiscardUnknown() { + xxx_messageInfo_PutRoutingRsp.DiscardUnknown(m) } -func (m *PutRoutingRsp) Reset() { *m = PutRoutingRsp{} } -func (m *PutRoutingRsp) String() string { return proto.CompactTextString(m) } -func (*PutRoutingRsp) ProtoMessage() {} -func (*PutRoutingRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{23} } +var xxx_messageInfo_PutRoutingRsp proto.InternalMessageInfo func (m *PutRoutingRsp) GetHeader() RpcHeader { if m != nil { @@ -628,15 +1298,45 @@ func (m *PutRoutingRsp) GetID() uint64 { } type RemoveRoutingReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveRoutingReq) Reset() { *m = RemoveRoutingReq{} } +func (m *RemoveRoutingReq) String() string { return proto.CompactTextString(m) } +func (*RemoveRoutingReq) ProtoMessage() {} +func (*RemoveRoutingReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{24} +} +func (m *RemoveRoutingReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveRoutingReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveRoutingReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveRoutingReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveRoutingReq.Merge(dst, src) +} +func (m *RemoveRoutingReq) XXX_Size() int { + return m.Size() +} +func (m *RemoveRoutingReq) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveRoutingReq.DiscardUnknown(m) } -func (m *RemoveRoutingReq) Reset() { *m = RemoveRoutingReq{} } -func (m *RemoveRoutingReq) String() string { return proto.CompactTextString(m) } -func (*RemoveRoutingReq) ProtoMessage() {} -func (*RemoveRoutingReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{24} } +var xxx_messageInfo_RemoveRoutingReq proto.InternalMessageInfo func (m *RemoveRoutingReq) GetHeader() RpcHeader { if m != nil { @@ -653,14 +1353,44 @@ func (m *RemoveRoutingReq) GetID() uint64 { } type RemoveRoutingRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveRoutingRsp) Reset() { *m = RemoveRoutingRsp{} } +func (m *RemoveRoutingRsp) String() string { return proto.CompactTextString(m) } +func (*RemoveRoutingRsp) ProtoMessage() {} +func (*RemoveRoutingRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{25} +} +func (m *RemoveRoutingRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveRoutingRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveRoutingRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveRoutingRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveRoutingRsp.Merge(dst, src) +} +func (m *RemoveRoutingRsp) XXX_Size() int { + return m.Size() +} +func (m *RemoveRoutingRsp) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveRoutingRsp.DiscardUnknown(m) } -func (m *RemoveRoutingRsp) Reset() { *m = RemoveRoutingRsp{} } -func (m *RemoveRoutingRsp) String() string { return proto.CompactTextString(m) } -func (*RemoveRoutingRsp) ProtoMessage() {} -func (*RemoveRoutingRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{25} } +var xxx_messageInfo_RemoveRoutingRsp proto.InternalMessageInfo func (m *RemoveRoutingRsp) GetHeader() RpcHeader { if m != nil { @@ -670,15 +1400,45 @@ func (m *RemoveRoutingRsp) GetHeader() RpcHeader { } type GetRoutingReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRoutingReq) Reset() { *m = GetRoutingReq{} } +func (m *GetRoutingReq) String() string { return proto.CompactTextString(m) } +func (*GetRoutingReq) ProtoMessage() {} +func (*GetRoutingReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{26} +} +func (m *GetRoutingReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRoutingReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRoutingReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetRoutingReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRoutingReq.Merge(dst, src) +} +func (m *GetRoutingReq) XXX_Size() int { + return m.Size() +} +func (m *GetRoutingReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetRoutingReq.DiscardUnknown(m) } -func (m *GetRoutingReq) Reset() { *m = GetRoutingReq{} } -func (m *GetRoutingReq) String() string { return proto.CompactTextString(m) } -func (*GetRoutingReq) ProtoMessage() {} -func (*GetRoutingReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{26} } +var xxx_messageInfo_GetRoutingReq proto.InternalMessageInfo func (m *GetRoutingReq) GetHeader() RpcHeader { if m != nil { @@ -695,15 +1455,45 @@ func (m *GetRoutingReq) GetID() uint64 { } type GetRoutingRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Routing *metapb.Routing `protobuf:"bytes,2,opt,name=routing" json:"routing,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Routing *metapb.Routing `protobuf:"bytes,2,opt,name=routing" json:"routing,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRoutingRsp) Reset() { *m = GetRoutingRsp{} } +func (m *GetRoutingRsp) String() string { return proto.CompactTextString(m) } +func (*GetRoutingRsp) ProtoMessage() {} +func (*GetRoutingRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{27} +} +func (m *GetRoutingRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRoutingRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRoutingRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetRoutingRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRoutingRsp.Merge(dst, src) +} +func (m *GetRoutingRsp) XXX_Size() int { + return m.Size() +} +func (m *GetRoutingRsp) XXX_DiscardUnknown() { + xxx_messageInfo_GetRoutingRsp.DiscardUnknown(m) } -func (m *GetRoutingRsp) Reset() { *m = GetRoutingRsp{} } -func (m *GetRoutingRsp) String() string { return proto.CompactTextString(m) } -func (*GetRoutingRsp) ProtoMessage() {} -func (*GetRoutingRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{27} } +var xxx_messageInfo_GetRoutingRsp proto.InternalMessageInfo func (m *GetRoutingRsp) GetHeader() RpcHeader { if m != nil { @@ -720,14 +1510,44 @@ func (m *GetRoutingRsp) GetRouting() *metapb.Routing { } type GetRoutingListReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetRoutingListReq) Reset() { *m = GetRoutingListReq{} } +func (m *GetRoutingListReq) String() string { return proto.CompactTextString(m) } +func (*GetRoutingListReq) ProtoMessage() {} +func (*GetRoutingListReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{28} +} +func (m *GetRoutingListReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetRoutingListReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetRoutingListReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetRoutingListReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetRoutingListReq.Merge(dst, src) +} +func (m *GetRoutingListReq) XXX_Size() int { + return m.Size() +} +func (m *GetRoutingListReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetRoutingListReq.DiscardUnknown(m) } -func (m *GetRoutingListReq) Reset() { *m = GetRoutingListReq{} } -func (m *GetRoutingListReq) String() string { return proto.CompactTextString(m) } -func (*GetRoutingListReq) ProtoMessage() {} -func (*GetRoutingListReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{28} } +var xxx_messageInfo_GetRoutingListReq proto.InternalMessageInfo func (m *GetRoutingListReq) GetHeader() RpcHeader { if m != nil { @@ -737,16 +1557,46 @@ func (m *GetRoutingListReq) GetHeader() RpcHeader { } type AddBindReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Cluster uint64 `protobuf:"varint,2,opt,name=cluster" json:"cluster"` - Server uint64 `protobuf:"varint,3,opt,name=server" json:"server"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Cluster uint64 `protobuf:"varint,2,opt,name=cluster" json:"cluster"` + Server uint64 `protobuf:"varint,3,opt,name=server" json:"server"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddBindReq) Reset() { *m = AddBindReq{} } +func (m *AddBindReq) String() string { return proto.CompactTextString(m) } +func (*AddBindReq) ProtoMessage() {} +func (*AddBindReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{29} +} +func (m *AddBindReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddBindReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddBindReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AddBindReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddBindReq.Merge(dst, src) +} +func (m *AddBindReq) XXX_Size() int { + return m.Size() +} +func (m *AddBindReq) XXX_DiscardUnknown() { + xxx_messageInfo_AddBindReq.DiscardUnknown(m) } -func (m *AddBindReq) Reset() { *m = AddBindReq{} } -func (m *AddBindReq) String() string { return proto.CompactTextString(m) } -func (*AddBindReq) ProtoMessage() {} -func (*AddBindReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{29} } +var xxx_messageInfo_AddBindReq proto.InternalMessageInfo func (m *AddBindReq) GetHeader() RpcHeader { if m != nil { @@ -770,14 +1620,44 @@ func (m *AddBindReq) GetServer() uint64 { } type AddBindRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AddBindRsp) Reset() { *m = AddBindRsp{} } +func (m *AddBindRsp) String() string { return proto.CompactTextString(m) } +func (*AddBindRsp) ProtoMessage() {} +func (*AddBindRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{30} +} +func (m *AddBindRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AddBindRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AddBindRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AddBindRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_AddBindRsp.Merge(dst, src) +} +func (m *AddBindRsp) XXX_Size() int { + return m.Size() +} +func (m *AddBindRsp) XXX_DiscardUnknown() { + xxx_messageInfo_AddBindRsp.DiscardUnknown(m) } -func (m *AddBindRsp) Reset() { *m = AddBindRsp{} } -func (m *AddBindRsp) String() string { return proto.CompactTextString(m) } -func (*AddBindRsp) ProtoMessage() {} -func (*AddBindRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{30} } +var xxx_messageInfo_AddBindRsp proto.InternalMessageInfo func (m *AddBindRsp) GetHeader() RpcHeader { if m != nil { @@ -787,16 +1667,46 @@ func (m *AddBindRsp) GetHeader() RpcHeader { } type RemoveBindReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Cluster uint64 `protobuf:"varint,2,opt,name=cluster" json:"cluster"` - Server uint64 `protobuf:"varint,3,opt,name=server" json:"server"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Cluster uint64 `protobuf:"varint,2,opt,name=cluster" json:"cluster"` + Server uint64 `protobuf:"varint,3,opt,name=server" json:"server"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveBindReq) Reset() { *m = RemoveBindReq{} } +func (m *RemoveBindReq) String() string { return proto.CompactTextString(m) } +func (*RemoveBindReq) ProtoMessage() {} +func (*RemoveBindReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{31} +} +func (m *RemoveBindReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveBindReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveBindReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveBindReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveBindReq.Merge(dst, src) +} +func (m *RemoveBindReq) XXX_Size() int { + return m.Size() +} +func (m *RemoveBindReq) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveBindReq.DiscardUnknown(m) } -func (m *RemoveBindReq) Reset() { *m = RemoveBindReq{} } -func (m *RemoveBindReq) String() string { return proto.CompactTextString(m) } -func (*RemoveBindReq) ProtoMessage() {} -func (*RemoveBindReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{31} } +var xxx_messageInfo_RemoveBindReq proto.InternalMessageInfo func (m *RemoveBindReq) GetHeader() RpcHeader { if m != nil { @@ -820,14 +1730,44 @@ func (m *RemoveBindReq) GetServer() uint64 { } type RemoveBindRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveBindRsp) Reset() { *m = RemoveBindRsp{} } +func (m *RemoveBindRsp) String() string { return proto.CompactTextString(m) } +func (*RemoveBindRsp) ProtoMessage() {} +func (*RemoveBindRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{32} +} +func (m *RemoveBindRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveBindRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveBindRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveBindRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveBindRsp.Merge(dst, src) +} +func (m *RemoveBindRsp) XXX_Size() int { + return m.Size() +} +func (m *RemoveBindRsp) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveBindRsp.DiscardUnknown(m) } -func (m *RemoveBindRsp) Reset() { *m = RemoveBindRsp{} } -func (m *RemoveBindRsp) String() string { return proto.CompactTextString(m) } -func (*RemoveBindRsp) ProtoMessage() {} -func (*RemoveBindRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{32} } +var xxx_messageInfo_RemoveBindRsp proto.InternalMessageInfo func (m *RemoveBindRsp) GetHeader() RpcHeader { if m != nil { @@ -837,15 +1777,45 @@ func (m *RemoveBindRsp) GetHeader() RpcHeader { } type RemoveClusterBindReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Cluster uint64 `protobuf:"varint,2,opt,name=cluster" json:"cluster"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Cluster uint64 `protobuf:"varint,2,opt,name=cluster" json:"cluster"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveClusterBindReq) Reset() { *m = RemoveClusterBindReq{} } +func (m *RemoveClusterBindReq) String() string { return proto.CompactTextString(m) } +func (*RemoveClusterBindReq) ProtoMessage() {} +func (*RemoveClusterBindReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{33} +} +func (m *RemoveClusterBindReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveClusterBindReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveClusterBindReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveClusterBindReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveClusterBindReq.Merge(dst, src) +} +func (m *RemoveClusterBindReq) XXX_Size() int { + return m.Size() +} +func (m *RemoveClusterBindReq) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveClusterBindReq.DiscardUnknown(m) } -func (m *RemoveClusterBindReq) Reset() { *m = RemoveClusterBindReq{} } -func (m *RemoveClusterBindReq) String() string { return proto.CompactTextString(m) } -func (*RemoveClusterBindReq) ProtoMessage() {} -func (*RemoveClusterBindReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{33} } +var xxx_messageInfo_RemoveClusterBindReq proto.InternalMessageInfo func (m *RemoveClusterBindReq) GetHeader() RpcHeader { if m != nil { @@ -862,14 +1832,44 @@ func (m *RemoveClusterBindReq) GetCluster() uint64 { } type RemoveClusterBindRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RemoveClusterBindRsp) Reset() { *m = RemoveClusterBindRsp{} } +func (m *RemoveClusterBindRsp) String() string { return proto.CompactTextString(m) } +func (*RemoveClusterBindRsp) ProtoMessage() {} +func (*RemoveClusterBindRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{34} +} +func (m *RemoveClusterBindRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RemoveClusterBindRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RemoveClusterBindRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RemoveClusterBindRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_RemoveClusterBindRsp.Merge(dst, src) +} +func (m *RemoveClusterBindRsp) XXX_Size() int { + return m.Size() +} +func (m *RemoveClusterBindRsp) XXX_DiscardUnknown() { + xxx_messageInfo_RemoveClusterBindRsp.DiscardUnknown(m) } -func (m *RemoveClusterBindRsp) Reset() { *m = RemoveClusterBindRsp{} } -func (m *RemoveClusterBindRsp) String() string { return proto.CompactTextString(m) } -func (*RemoveClusterBindRsp) ProtoMessage() {} -func (*RemoveClusterBindRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{34} } +var xxx_messageInfo_RemoveClusterBindRsp proto.InternalMessageInfo func (m *RemoveClusterBindRsp) GetHeader() RpcHeader { if m != nil { @@ -879,15 +1879,45 @@ func (m *RemoveClusterBindRsp) GetHeader() RpcHeader { } type GetBindServersReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Cluster uint64 `protobuf:"varint,2,opt,name=cluster" json:"cluster"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Cluster uint64 `protobuf:"varint,2,opt,name=cluster" json:"cluster"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetBindServersReq) Reset() { *m = GetBindServersReq{} } +func (m *GetBindServersReq) String() string { return proto.CompactTextString(m) } +func (*GetBindServersReq) ProtoMessage() {} +func (*GetBindServersReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{35} +} +func (m *GetBindServersReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetBindServersReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetBindServersReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetBindServersReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetBindServersReq.Merge(dst, src) +} +func (m *GetBindServersReq) XXX_Size() int { + return m.Size() +} +func (m *GetBindServersReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetBindServersReq.DiscardUnknown(m) } -func (m *GetBindServersReq) Reset() { *m = GetBindServersReq{} } -func (m *GetBindServersReq) String() string { return proto.CompactTextString(m) } -func (*GetBindServersReq) ProtoMessage() {} -func (*GetBindServersReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{35} } +var xxx_messageInfo_GetBindServersReq proto.InternalMessageInfo func (m *GetBindServersReq) GetHeader() RpcHeader { if m != nil { @@ -904,15 +1934,45 @@ func (m *GetBindServersReq) GetCluster() uint64 { } type GetBindServersRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - Servers []uint64 `protobuf:"varint,2,rep,name=servers" json:"servers,omitempty"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + Servers []uint64 `protobuf:"varint,2,rep,name=servers" json:"servers,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetBindServersRsp) Reset() { *m = GetBindServersRsp{} } +func (m *GetBindServersRsp) String() string { return proto.CompactTextString(m) } +func (*GetBindServersRsp) ProtoMessage() {} +func (*GetBindServersRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{36} +} +func (m *GetBindServersRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetBindServersRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetBindServersRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *GetBindServersRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetBindServersRsp.Merge(dst, src) +} +func (m *GetBindServersRsp) XXX_Size() int { + return m.Size() +} +func (m *GetBindServersRsp) XXX_DiscardUnknown() { + xxx_messageInfo_GetBindServersRsp.DiscardUnknown(m) } -func (m *GetBindServersRsp) Reset() { *m = GetBindServersRsp{} } -func (m *GetBindServersRsp) String() string { return proto.CompactTextString(m) } -func (*GetBindServersRsp) ProtoMessage() {} -func (*GetBindServersRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{36} } +var xxx_messageInfo_GetBindServersRsp proto.InternalMessageInfo func (m *GetBindServersRsp) GetHeader() RpcHeader { if m != nil { @@ -929,14 +1989,44 @@ func (m *GetBindServersRsp) GetServers() []uint64 { } type CleanReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CleanReq) Reset() { *m = CleanReq{} } +func (m *CleanReq) String() string { return proto.CompactTextString(m) } +func (*CleanReq) ProtoMessage() {} +func (*CleanReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{37} +} +func (m *CleanReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CleanReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CleanReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CleanReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_CleanReq.Merge(dst, src) +} +func (m *CleanReq) XXX_Size() int { + return m.Size() +} +func (m *CleanReq) XXX_DiscardUnknown() { + xxx_messageInfo_CleanReq.DiscardUnknown(m) } -func (m *CleanReq) Reset() { *m = CleanReq{} } -func (m *CleanReq) String() string { return proto.CompactTextString(m) } -func (*CleanReq) ProtoMessage() {} -func (*CleanReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{37} } +var xxx_messageInfo_CleanReq proto.InternalMessageInfo func (m *CleanReq) GetHeader() RpcHeader { if m != nil { @@ -946,14 +2036,44 @@ func (m *CleanReq) GetHeader() RpcHeader { } type CleanRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CleanRsp) Reset() { *m = CleanRsp{} } +func (m *CleanRsp) String() string { return proto.CompactTextString(m) } +func (*CleanRsp) ProtoMessage() {} +func (*CleanRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{38} +} +func (m *CleanRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CleanRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CleanRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CleanRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_CleanRsp.Merge(dst, src) +} +func (m *CleanRsp) XXX_Size() int { + return m.Size() +} +func (m *CleanRsp) XXX_DiscardUnknown() { + xxx_messageInfo_CleanRsp.DiscardUnknown(m) } -func (m *CleanRsp) Reset() { *m = CleanRsp{} } -func (m *CleanRsp) String() string { return proto.CompactTextString(m) } -func (*CleanRsp) ProtoMessage() {} -func (*CleanRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{38} } +var xxx_messageInfo_CleanRsp proto.InternalMessageInfo func (m *CleanRsp) GetHeader() RpcHeader { if m != nil { @@ -963,15 +2083,45 @@ func (m *CleanRsp) GetHeader() RpcHeader { } type SetIDReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + ID uint64 `protobuf:"varint,2,opt,name=id" json:"id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetIDReq) Reset() { *m = SetIDReq{} } +func (m *SetIDReq) String() string { return proto.CompactTextString(m) } +func (*SetIDReq) ProtoMessage() {} +func (*SetIDReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{39} +} +func (m *SetIDReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetIDReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetIDReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SetIDReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetIDReq.Merge(dst, src) +} +func (m *SetIDReq) XXX_Size() int { + return m.Size() +} +func (m *SetIDReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetIDReq.DiscardUnknown(m) } -func (m *SetIDReq) Reset() { *m = SetIDReq{} } -func (m *SetIDReq) String() string { return proto.CompactTextString(m) } -func (*SetIDReq) ProtoMessage() {} -func (*SetIDReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{39} } +var xxx_messageInfo_SetIDReq proto.InternalMessageInfo func (m *SetIDReq) GetHeader() RpcHeader { if m != nil { @@ -988,14 +2138,44 @@ func (m *SetIDReq) GetID() uint64 { } type SetIDRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - XXX_unrecognized []byte `json:"-"` + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetIDRsp) Reset() { *m = SetIDRsp{} } +func (m *SetIDRsp) String() string { return proto.CompactTextString(m) } +func (*SetIDRsp) ProtoMessage() {} +func (*SetIDRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{40} +} +func (m *SetIDRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SetIDRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SetIDRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SetIDRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetIDRsp.Merge(dst, src) +} +func (m *SetIDRsp) XXX_Size() int { + return m.Size() +} +func (m *SetIDRsp) XXX_DiscardUnknown() { + xxx_messageInfo_SetIDRsp.DiscardUnknown(m) } -func (m *SetIDRsp) Reset() { *m = SetIDRsp{} } -func (m *SetIDRsp) String() string { return proto.CompactTextString(m) } -func (*SetIDRsp) ProtoMessage() {} -func (*SetIDRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{40} } +var xxx_messageInfo_SetIDRsp proto.InternalMessageInfo func (m *SetIDRsp) GetHeader() RpcHeader { if m != nil { @@ -1005,24 +2185,54 @@ func (m *SetIDRsp) GetHeader() RpcHeader { } type BatchReq struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - PutClusters []*PutClusterReq `protobuf:"bytes,2,rep,name=putClusters" json:"putClusters,omitempty"` - RemoveClusters []*RemoveClusterReq `protobuf:"bytes,3,rep,name=removeClusters" json:"removeClusters,omitempty"` - PutServers []*PutServerReq `protobuf:"bytes,4,rep,name=putServers" json:"putServers,omitempty"` - RemoveServers []*RemoveServerReq `protobuf:"bytes,5,rep,name=removeServers" json:"removeServers,omitempty"` - PutAPIs []*PutAPIReq `protobuf:"bytes,6,rep,name=putAPIs" json:"putAPIs,omitempty"` - RemoveAPIs []*RemoveAPIReq `protobuf:"bytes,7,rep,name=removeAPIs" json:"removeAPIs,omitempty"` - PutRoutings []*PutRoutingReq `protobuf:"bytes,8,rep,name=putRoutings" json:"putRoutings,omitempty"` - RemoveRoutings []*RemoveRoutingReq `protobuf:"bytes,9,rep,name=removeRoutings" json:"removeRoutings,omitempty"` - AddBinds []*AddBindReq `protobuf:"bytes,10,rep,name=addBinds" json:"addBinds,omitempty"` - RemoveBinds []*RemoveBindReq `protobuf:"bytes,11,rep,name=removeBinds" json:"removeBinds,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *BatchReq) Reset() { *m = BatchReq{} } -func (m *BatchReq) String() string { return proto.CompactTextString(m) } -func (*BatchReq) ProtoMessage() {} -func (*BatchReq) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{41} } + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + PutClusters []*PutClusterReq `protobuf:"bytes,2,rep,name=putClusters" json:"putClusters,omitempty"` + RemoveClusters []*RemoveClusterReq `protobuf:"bytes,3,rep,name=removeClusters" json:"removeClusters,omitempty"` + PutServers []*PutServerReq `protobuf:"bytes,4,rep,name=putServers" json:"putServers,omitempty"` + RemoveServers []*RemoveServerReq `protobuf:"bytes,5,rep,name=removeServers" json:"removeServers,omitempty"` + PutAPIs []*PutAPIReq `protobuf:"bytes,6,rep,name=putAPIs" json:"putAPIs,omitempty"` + RemoveAPIs []*RemoveAPIReq `protobuf:"bytes,7,rep,name=removeAPIs" json:"removeAPIs,omitempty"` + PutRoutings []*PutRoutingReq `protobuf:"bytes,8,rep,name=putRoutings" json:"putRoutings,omitempty"` + RemoveRoutings []*RemoveRoutingReq `protobuf:"bytes,9,rep,name=removeRoutings" json:"removeRoutings,omitempty"` + AddBinds []*AddBindReq `protobuf:"bytes,10,rep,name=addBinds" json:"addBinds,omitempty"` + RemoveBinds []*RemoveBindReq `protobuf:"bytes,11,rep,name=removeBinds" json:"removeBinds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BatchReq) Reset() { *m = BatchReq{} } +func (m *BatchReq) String() string { return proto.CompactTextString(m) } +func (*BatchReq) ProtoMessage() {} +func (*BatchReq) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{41} +} +func (m *BatchReq) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchReq.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BatchReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchReq.Merge(dst, src) +} +func (m *BatchReq) XXX_Size() int { + return m.Size() +} +func (m *BatchReq) XXX_DiscardUnknown() { + xxx_messageInfo_BatchReq.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchReq proto.InternalMessageInfo func (m *BatchReq) GetHeader() RpcHeader { if m != nil { @@ -1102,24 +2312,54 @@ func (m *BatchReq) GetRemoveBinds() []*RemoveBindReq { } type BatchRsp struct { - Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` - PutClusters []*PutClusterRsp `protobuf:"bytes,2,rep,name=putClusters" json:"putClusters,omitempty"` - RemoveClusters []*RemoveClusterRsp `protobuf:"bytes,3,rep,name=removeClusters" json:"removeClusters,omitempty"` - PutServers []*PutServerRsp `protobuf:"bytes,4,rep,name=putServers" json:"putServers,omitempty"` - RemoveServers []*RemoveServerRsp `protobuf:"bytes,5,rep,name=removeServers" json:"removeServers,omitempty"` - PutAPIs []*PutAPIRsp `protobuf:"bytes,6,rep,name=putAPIs" json:"putAPIs,omitempty"` - RemoveAPIs []*RemoveAPIRsp `protobuf:"bytes,7,rep,name=removeAPIs" json:"removeAPIs,omitempty"` - PutRoutings []*PutRoutingRsp `protobuf:"bytes,8,rep,name=putRoutings" json:"putRoutings,omitempty"` - RemoveRoutings []*RemoveRoutingRsp `protobuf:"bytes,9,rep,name=removeRoutings" json:"removeRoutings,omitempty"` - AddBinds []*AddBindRsp `protobuf:"bytes,10,rep,name=addBinds" json:"addBinds,omitempty"` - RemoveBinds []*RemoveBindRsp `protobuf:"bytes,11,rep,name=removeBinds" json:"removeBinds,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *BatchRsp) Reset() { *m = BatchRsp{} } -func (m *BatchRsp) String() string { return proto.CompactTextString(m) } -func (*BatchRsp) ProtoMessage() {} -func (*BatchRsp) Descriptor() ([]byte, []int) { return fileDescriptorRpcpb, []int{42} } + Header RpcHeader `protobuf:"bytes,1,opt,name=header" json:"header"` + PutClusters []*PutClusterRsp `protobuf:"bytes,2,rep,name=putClusters" json:"putClusters,omitempty"` + RemoveClusters []*RemoveClusterRsp `protobuf:"bytes,3,rep,name=removeClusters" json:"removeClusters,omitempty"` + PutServers []*PutServerRsp `protobuf:"bytes,4,rep,name=putServers" json:"putServers,omitempty"` + RemoveServers []*RemoveServerRsp `protobuf:"bytes,5,rep,name=removeServers" json:"removeServers,omitempty"` + PutAPIs []*PutAPIRsp `protobuf:"bytes,6,rep,name=putAPIs" json:"putAPIs,omitempty"` + RemoveAPIs []*RemoveAPIRsp `protobuf:"bytes,7,rep,name=removeAPIs" json:"removeAPIs,omitempty"` + PutRoutings []*PutRoutingRsp `protobuf:"bytes,8,rep,name=putRoutings" json:"putRoutings,omitempty"` + RemoveRoutings []*RemoveRoutingRsp `protobuf:"bytes,9,rep,name=removeRoutings" json:"removeRoutings,omitempty"` + AddBinds []*AddBindRsp `protobuf:"bytes,10,rep,name=addBinds" json:"addBinds,omitempty"` + RemoveBinds []*RemoveBindRsp `protobuf:"bytes,11,rep,name=removeBinds" json:"removeBinds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BatchRsp) Reset() { *m = BatchRsp{} } +func (m *BatchRsp) String() string { return proto.CompactTextString(m) } +func (*BatchRsp) ProtoMessage() {} +func (*BatchRsp) Descriptor() ([]byte, []int) { + return fileDescriptor_rpcpb_f7f5893866fd3533, []int{42} +} +func (m *BatchRsp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BatchRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BatchRsp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BatchRsp) XXX_Merge(src proto.Message) { + xxx_messageInfo_BatchRsp.Merge(dst, src) +} +func (m *BatchRsp) XXX_Size() int { + return m.Size() +} +func (m *BatchRsp) XXX_DiscardUnknown() { + xxx_messageInfo_BatchRsp.DiscardUnknown(m) +} + +var xxx_messageInfo_BatchRsp proto.InternalMessageInfo func (m *BatchRsp) GetHeader() RpcHeader { if m != nil { @@ -1252,8 +2492,9 @@ var _ grpc.ClientConn // is compatible with the grpc package it is being compiled against. const _ = grpc.SupportPackageIsVersion4 -// Client API for MetaService service - +// MetaServiceClient is the client API for MetaService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MetaServiceClient interface { PutCluster(ctx context.Context, in *PutClusterReq, opts ...grpc.CallOption) (*PutClusterRsp, error) RemoveCluster(ctx context.Context, in *RemoveClusterReq, opts ...grpc.CallOption) (*RemoveClusterRsp, error) @@ -1290,7 +2531,7 @@ func NewMetaServiceClient(cc *grpc.ClientConn) MetaServiceClient { func (c *metaServiceClient) PutCluster(ctx context.Context, in *PutClusterReq, opts ...grpc.CallOption) (*PutClusterRsp, error) { out := new(PutClusterRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/PutCluster", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/PutCluster", in, out, opts...) if err != nil { return nil, err } @@ -1299,7 +2540,7 @@ func (c *metaServiceClient) PutCluster(ctx context.Context, in *PutClusterReq, o func (c *metaServiceClient) RemoveCluster(ctx context.Context, in *RemoveClusterReq, opts ...grpc.CallOption) (*RemoveClusterRsp, error) { out := new(RemoveClusterRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/RemoveCluster", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/RemoveCluster", in, out, opts...) if err != nil { return nil, err } @@ -1308,7 +2549,7 @@ func (c *metaServiceClient) RemoveCluster(ctx context.Context, in *RemoveCluster func (c *metaServiceClient) GetCluster(ctx context.Context, in *GetClusterReq, opts ...grpc.CallOption) (*GetClusterRsp, error) { out := new(GetClusterRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/GetCluster", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/GetCluster", in, out, opts...) if err != nil { return nil, err } @@ -1316,7 +2557,7 @@ func (c *metaServiceClient) GetCluster(ctx context.Context, in *GetClusterReq, o } func (c *metaServiceClient) GetClusterList(ctx context.Context, in *GetClusterListReq, opts ...grpc.CallOption) (MetaService_GetClusterListClient, error) { - stream, err := grpc.NewClientStream(ctx, &_MetaService_serviceDesc.Streams[0], c.cc, "/rpcpb.MetaService/GetClusterList", opts...) + stream, err := c.cc.NewStream(ctx, &_MetaService_serviceDesc.Streams[0], "/rpcpb.MetaService/GetClusterList", opts...) if err != nil { return nil, err } @@ -1349,7 +2590,7 @@ func (x *metaServiceGetClusterListClient) Recv() (*metapb.Cluster, error) { func (c *metaServiceClient) PutServer(ctx context.Context, in *PutServerReq, opts ...grpc.CallOption) (*PutServerRsp, error) { out := new(PutServerRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/PutServer", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/PutServer", in, out, opts...) if err != nil { return nil, err } @@ -1358,7 +2599,7 @@ func (c *metaServiceClient) PutServer(ctx context.Context, in *PutServerReq, opt func (c *metaServiceClient) RemoveServer(ctx context.Context, in *RemoveServerReq, opts ...grpc.CallOption) (*RemoveServerRsp, error) { out := new(RemoveServerRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/RemoveServer", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/RemoveServer", in, out, opts...) if err != nil { return nil, err } @@ -1367,7 +2608,7 @@ func (c *metaServiceClient) RemoveServer(ctx context.Context, in *RemoveServerRe func (c *metaServiceClient) GetServer(ctx context.Context, in *GetServerReq, opts ...grpc.CallOption) (*GetServerRsp, error) { out := new(GetServerRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/GetServer", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/GetServer", in, out, opts...) if err != nil { return nil, err } @@ -1375,7 +2616,7 @@ func (c *metaServiceClient) GetServer(ctx context.Context, in *GetServerReq, opt } func (c *metaServiceClient) GetServerList(ctx context.Context, in *GetServerListReq, opts ...grpc.CallOption) (MetaService_GetServerListClient, error) { - stream, err := grpc.NewClientStream(ctx, &_MetaService_serviceDesc.Streams[1], c.cc, "/rpcpb.MetaService/GetServerList", opts...) + stream, err := c.cc.NewStream(ctx, &_MetaService_serviceDesc.Streams[1], "/rpcpb.MetaService/GetServerList", opts...) if err != nil { return nil, err } @@ -1408,7 +2649,7 @@ func (x *metaServiceGetServerListClient) Recv() (*metapb.Server, error) { func (c *metaServiceClient) PutAPI(ctx context.Context, in *PutAPIReq, opts ...grpc.CallOption) (*PutAPIRsp, error) { out := new(PutAPIRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/PutAPI", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/PutAPI", in, out, opts...) if err != nil { return nil, err } @@ -1417,7 +2658,7 @@ func (c *metaServiceClient) PutAPI(ctx context.Context, in *PutAPIReq, opts ...g func (c *metaServiceClient) RemoveAPI(ctx context.Context, in *RemoveAPIReq, opts ...grpc.CallOption) (*RemoveAPIRsp, error) { out := new(RemoveAPIRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/RemoveAPI", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/RemoveAPI", in, out, opts...) if err != nil { return nil, err } @@ -1426,7 +2667,7 @@ func (c *metaServiceClient) RemoveAPI(ctx context.Context, in *RemoveAPIReq, opt func (c *metaServiceClient) GetAPI(ctx context.Context, in *GetAPIReq, opts ...grpc.CallOption) (*GetAPIRsp, error) { out := new(GetAPIRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/GetAPI", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/GetAPI", in, out, opts...) if err != nil { return nil, err } @@ -1434,7 +2675,7 @@ func (c *metaServiceClient) GetAPI(ctx context.Context, in *GetAPIReq, opts ...g } func (c *metaServiceClient) GetAPIList(ctx context.Context, in *GetAPIListReq, opts ...grpc.CallOption) (MetaService_GetAPIListClient, error) { - stream, err := grpc.NewClientStream(ctx, &_MetaService_serviceDesc.Streams[2], c.cc, "/rpcpb.MetaService/GetAPIList", opts...) + stream, err := c.cc.NewStream(ctx, &_MetaService_serviceDesc.Streams[2], "/rpcpb.MetaService/GetAPIList", opts...) if err != nil { return nil, err } @@ -1467,7 +2708,7 @@ func (x *metaServiceGetAPIListClient) Recv() (*metapb.API, error) { func (c *metaServiceClient) PutRouting(ctx context.Context, in *PutRoutingReq, opts ...grpc.CallOption) (*PutRoutingRsp, error) { out := new(PutRoutingRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/PutRouting", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/PutRouting", in, out, opts...) if err != nil { return nil, err } @@ -1476,7 +2717,7 @@ func (c *metaServiceClient) PutRouting(ctx context.Context, in *PutRoutingReq, o func (c *metaServiceClient) RemoveRouting(ctx context.Context, in *RemoveRoutingReq, opts ...grpc.CallOption) (*RemoveRoutingRsp, error) { out := new(RemoveRoutingRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/RemoveRouting", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/RemoveRouting", in, out, opts...) if err != nil { return nil, err } @@ -1485,7 +2726,7 @@ func (c *metaServiceClient) RemoveRouting(ctx context.Context, in *RemoveRouting func (c *metaServiceClient) GetRouting(ctx context.Context, in *GetRoutingReq, opts ...grpc.CallOption) (*GetRoutingRsp, error) { out := new(GetRoutingRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/GetRouting", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/GetRouting", in, out, opts...) if err != nil { return nil, err } @@ -1493,7 +2734,7 @@ func (c *metaServiceClient) GetRouting(ctx context.Context, in *GetRoutingReq, o } func (c *metaServiceClient) GetRoutingList(ctx context.Context, in *GetRoutingListReq, opts ...grpc.CallOption) (MetaService_GetRoutingListClient, error) { - stream, err := grpc.NewClientStream(ctx, &_MetaService_serviceDesc.Streams[3], c.cc, "/rpcpb.MetaService/GetRoutingList", opts...) + stream, err := c.cc.NewStream(ctx, &_MetaService_serviceDesc.Streams[3], "/rpcpb.MetaService/GetRoutingList", opts...) if err != nil { return nil, err } @@ -1526,7 +2767,7 @@ func (x *metaServiceGetRoutingListClient) Recv() (*metapb.Routing, error) { func (c *metaServiceClient) AddBind(ctx context.Context, in *AddBindReq, opts ...grpc.CallOption) (*AddBindRsp, error) { out := new(AddBindRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/AddBind", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/AddBind", in, out, opts...) if err != nil { return nil, err } @@ -1535,7 +2776,7 @@ func (c *metaServiceClient) AddBind(ctx context.Context, in *AddBindReq, opts .. func (c *metaServiceClient) RemoveBind(ctx context.Context, in *RemoveBindReq, opts ...grpc.CallOption) (*RemoveBindRsp, error) { out := new(RemoveBindRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/RemoveBind", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/RemoveBind", in, out, opts...) if err != nil { return nil, err } @@ -1544,7 +2785,7 @@ func (c *metaServiceClient) RemoveBind(ctx context.Context, in *RemoveBindReq, o func (c *metaServiceClient) RemoveClusterBind(ctx context.Context, in *RemoveClusterBindReq, opts ...grpc.CallOption) (*RemoveClusterBindRsp, error) { out := new(RemoveClusterBindRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/RemoveClusterBind", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/RemoveClusterBind", in, out, opts...) if err != nil { return nil, err } @@ -1553,7 +2794,7 @@ func (c *metaServiceClient) RemoveClusterBind(ctx context.Context, in *RemoveClu func (c *metaServiceClient) GetBindServers(ctx context.Context, in *GetBindServersReq, opts ...grpc.CallOption) (*GetBindServersRsp, error) { out := new(GetBindServersRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/GetBindServers", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/GetBindServers", in, out, opts...) if err != nil { return nil, err } @@ -1562,7 +2803,7 @@ func (c *metaServiceClient) GetBindServers(ctx context.Context, in *GetBindServe func (c *metaServiceClient) Clean(ctx context.Context, in *CleanReq, opts ...grpc.CallOption) (*CleanRsp, error) { out := new(CleanRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/Clean", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/Clean", in, out, opts...) if err != nil { return nil, err } @@ -1571,7 +2812,7 @@ func (c *metaServiceClient) Clean(ctx context.Context, in *CleanReq, opts ...grp func (c *metaServiceClient) SetID(ctx context.Context, in *SetIDReq, opts ...grpc.CallOption) (*SetIDRsp, error) { out := new(SetIDRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/SetID", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/SetID", in, out, opts...) if err != nil { return nil, err } @@ -1580,15 +2821,14 @@ func (c *metaServiceClient) SetID(ctx context.Context, in *SetIDReq, opts ...grp func (c *metaServiceClient) Batch(ctx context.Context, in *BatchReq, opts ...grpc.CallOption) (*BatchRsp, error) { out := new(BatchRsp) - err := grpc.Invoke(ctx, "/rpcpb.MetaService/Batch", in, out, c.cc, opts...) + err := c.cc.Invoke(ctx, "/rpcpb.MetaService/Batch", in, out, opts...) if err != nil { return nil, err } return out, nil } -// Server API for MetaService service - +// MetaServiceServer is the server API for MetaService service. type MetaServiceServer interface { PutCluster(context.Context, *PutClusterReq) (*PutClusterRsp, error) RemoveCluster(context.Context, *RemoveClusterReq) (*RemoveClusterRsp, error) @@ -3770,24 +5010,6 @@ func (m *BatchRsp) MarshalTo(dAtA []byte) (int, error) { return i, nil } -func encodeFixed64Rpcpb(dAtA []byte, offset int, v uint64) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - dAtA[offset+4] = uint8(v >> 32) - dAtA[offset+5] = uint8(v >> 40) - dAtA[offset+6] = uint8(v >> 48) - dAtA[offset+7] = uint8(v >> 56) - return offset + 8 -} -func encodeFixed32Rpcpb(dAtA []byte, offset int, v uint32) int { - dAtA[offset] = uint8(v) - dAtA[offset+1] = uint8(v >> 8) - dAtA[offset+2] = uint8(v >> 16) - dAtA[offset+3] = uint8(v >> 24) - return offset + 4 -} func encodeVarintRpcpb(dAtA []byte, offset int, v uint64) int { for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -3798,6 +5020,9 @@ func encodeVarintRpcpb(dAtA []byte, offset int, v uint64) int { return offset + 1 } func (m *RpcHeader) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = len(m.Uuid) @@ -3809,6 +5034,9 @@ func (m *RpcHeader) Size() (n int) { } func (m *PutClusterReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3822,6 +5050,9 @@ func (m *PutClusterReq) Size() (n int) { } func (m *PutClusterRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3834,6 +5065,9 @@ func (m *PutClusterRsp) Size() (n int) { } func (m *RemoveClusterReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3846,6 +5080,9 @@ func (m *RemoveClusterReq) Size() (n int) { } func (m *RemoveClusterRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3857,6 +5094,9 @@ func (m *RemoveClusterRsp) Size() (n int) { } func (m *GetClusterReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3869,6 +5109,9 @@ func (m *GetClusterReq) Size() (n int) { } func (m *GetClusterRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3884,6 +5127,9 @@ func (m *GetClusterRsp) Size() (n int) { } func (m *GetClusterListReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3895,6 +5141,9 @@ func (m *GetClusterListReq) Size() (n int) { } func (m *PutServerReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3908,6 +5157,9 @@ func (m *PutServerReq) Size() (n int) { } func (m *PutServerRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3920,6 +5172,9 @@ func (m *PutServerRsp) Size() (n int) { } func (m *RemoveServerReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3932,6 +5187,9 @@ func (m *RemoveServerReq) Size() (n int) { } func (m *RemoveServerRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3943,6 +5201,9 @@ func (m *RemoveServerRsp) Size() (n int) { } func (m *GetServerReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3955,6 +5216,9 @@ func (m *GetServerReq) Size() (n int) { } func (m *GetServerRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3970,6 +5234,9 @@ func (m *GetServerRsp) Size() (n int) { } func (m *GetServerListReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3981,6 +5248,9 @@ func (m *GetServerListReq) Size() (n int) { } func (m *PutAPIReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -3994,6 +5264,9 @@ func (m *PutAPIReq) Size() (n int) { } func (m *PutAPIRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4006,6 +5279,9 @@ func (m *PutAPIRsp) Size() (n int) { } func (m *RemoveAPIReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4018,6 +5294,9 @@ func (m *RemoveAPIReq) Size() (n int) { } func (m *RemoveAPIRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4029,6 +5308,9 @@ func (m *RemoveAPIRsp) Size() (n int) { } func (m *GetAPIReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4041,6 +5323,9 @@ func (m *GetAPIReq) Size() (n int) { } func (m *GetAPIRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4056,6 +5341,9 @@ func (m *GetAPIRsp) Size() (n int) { } func (m *GetAPIListReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4067,6 +5355,9 @@ func (m *GetAPIListReq) Size() (n int) { } func (m *PutRoutingReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4080,6 +5371,9 @@ func (m *PutRoutingReq) Size() (n int) { } func (m *PutRoutingRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4092,6 +5386,9 @@ func (m *PutRoutingRsp) Size() (n int) { } func (m *RemoveRoutingReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4104,6 +5401,9 @@ func (m *RemoveRoutingReq) Size() (n int) { } func (m *RemoveRoutingRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4115,6 +5415,9 @@ func (m *RemoveRoutingRsp) Size() (n int) { } func (m *GetRoutingReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4127,6 +5430,9 @@ func (m *GetRoutingReq) Size() (n int) { } func (m *GetRoutingRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4142,6 +5448,9 @@ func (m *GetRoutingRsp) Size() (n int) { } func (m *GetRoutingListReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4153,6 +5462,9 @@ func (m *GetRoutingListReq) Size() (n int) { } func (m *AddBindReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4166,6 +5478,9 @@ func (m *AddBindReq) Size() (n int) { } func (m *AddBindRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4177,6 +5492,9 @@ func (m *AddBindRsp) Size() (n int) { } func (m *RemoveBindReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4190,6 +5508,9 @@ func (m *RemoveBindReq) Size() (n int) { } func (m *RemoveBindRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4201,6 +5522,9 @@ func (m *RemoveBindRsp) Size() (n int) { } func (m *RemoveClusterBindReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4213,6 +5537,9 @@ func (m *RemoveClusterBindReq) Size() (n int) { } func (m *RemoveClusterBindRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4224,6 +5551,9 @@ func (m *RemoveClusterBindRsp) Size() (n int) { } func (m *GetBindServersReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4236,6 +5566,9 @@ func (m *GetBindServersReq) Size() (n int) { } func (m *GetBindServersRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4252,6 +5585,9 @@ func (m *GetBindServersRsp) Size() (n int) { } func (m *CleanReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4263,6 +5599,9 @@ func (m *CleanReq) Size() (n int) { } func (m *CleanRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4274,6 +5613,9 @@ func (m *CleanRsp) Size() (n int) { } func (m *SetIDReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4286,6 +5628,9 @@ func (m *SetIDReq) Size() (n int) { } func (m *SetIDRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4297,6 +5642,9 @@ func (m *SetIDRsp) Size() (n int) { } func (m *BatchReq) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -4368,6 +5716,9 @@ func (m *BatchReq) Size() (n int) { } func (m *BatchRsp) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l l = m.Header.Size() @@ -8060,6 +9411,17 @@ func (m *GetBindServersRsp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Servers) == 0 { + m.Servers = make([]uint64, 0, elementCount) + } for iNdEx < postIndex { var v uint64 for shift := uint(0); ; shift += 7 { @@ -9333,9 +10695,9 @@ var ( ErrIntOverflowRpcpb = fmt.Errorf("proto: integer overflow") ) -func init() { proto.RegisterFile("rpcpb.proto", fileDescriptorRpcpb) } +func init() { proto.RegisterFile("rpcpb.proto", fileDescriptor_rpcpb_f7f5893866fd3533) } -var fileDescriptorRpcpb = []byte{ +var fileDescriptor_rpcpb_f7f5893866fd3533 = []byte{ // 1166 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0x5b, 0x6b, 0x1b, 0x47, 0x14, 0xde, 0x95, 0x64, 0x4b, 0x3a, 0xf2, 0x75, 0x62, 0xda, 0x65, 0x5a, 0x94, 0xb0, 0x50, 0x28, diff --git a/pkg/proxy/checker.go b/pkg/proxy/checker.go index 5e7f8c36..f089f8aa 100644 --- a/pkg/proxy/checker.go +++ b/pkg/proxy/checker.go @@ -88,7 +88,7 @@ func (r *dispatcher) check(id uint64) { if ok { for _, c := range clusters { - c.add(svr.meta.ID) + c.add(svr.meta) } } } else { diff --git a/pkg/proxy/dispatcher_meta.go b/pkg/proxy/dispatcher_meta.go index b254b43f..e51aacaf 100644 --- a/pkg/proxy/dispatcher_meta.go +++ b/pkg/proxy/dispatcher_meta.go @@ -585,7 +585,7 @@ func (r *dispatcher) addBind(bind *metapb.Bind) error { log.Infof("bind <%d,%d> created", bind.ClusterID, bind.ServerID) if server.status == metapb.Up { - cluster.add(server.meta.ID) + cluster.add(server.meta) } return nil } diff --git a/pkg/proxy/dispatcher_runtime.go b/pkg/proxy/dispatcher_runtime.go index 5f03e620..f7d07a97 100644 --- a/pkg/proxy/dispatcher_runtime.go +++ b/pkg/proxy/dispatcher_runtime.go @@ -17,7 +17,6 @@ import ( "github.com/fagongzi/gateway/pkg/util" "github.com/fagongzi/goetty" "github.com/fagongzi/log" - "github.com/fagongzi/util/collection" "github.com/fagongzi/util/hack" pbutil "github.com/fagongzi/util/protoc" "github.com/valyala/fasthttp" @@ -49,37 +48,55 @@ func (c *clusterRuntime) updateMeta(meta *metapb.Cluster) { func (c *clusterRuntime) foreach(do func(uint64)) { for iter := c.svrs.Back(); iter != nil; iter = iter.Prev() { - addr, _ := iter.Value.(uint64) - do(addr) + svr, _ := iter.Value.(*metapb.Server) + do(svr.ID) } } func (c *clusterRuntime) remove(id uint64) { - collection.Remove(c.svrs, id) + remove(c.svrs, id) log.Infof("bind <%d,%d> inactived", c.meta.ID, id) } -func (c *clusterRuntime) add(id uint64) { - if collection.IndexOf(c.svrs, id) >= 0 { - return +func remove(l *list.List, id uint64) { + var e *list.Element + + for iter := l.Front(); iter != nil; iter = iter.Next() { + if iter.Value.(*metapb.Server).ID == id { + e = iter + break + } } - c.svrs.PushBack(id) - log.Infof("bind <%d,%d> actived", c.meta.ID, id) + if nil != e { + l.Remove(e) + } } -func (c *clusterRuntime) selectServer(req *fasthttp.Request) uint64 { - index := c.lb.Select(req, c.svrs) - if 0 > index { - return 0 +func (c *clusterRuntime) add(svr *metapb.Server) { + if indexOf(c.svrs, svr.ID) >= 0 { + return } - e := collection.Get(c.svrs, index) - if nil == e { - return 0 + c.svrs.PushBack(svr) + log.Infof("bind <%d,%d> actived", c.meta.ID, svr.ID) +} + +func indexOf(l *list.List, id uint64) int { + i := 0 + for iter := l.Front(); iter != nil; iter = iter.Next() { + if iter.Value.(*metapb.Server).ID == id { + return i + } + + i++ } - return e.Value.(uint64) + return -1 +} + +func (c *clusterRuntime) selectServer(req *fasthttp.Request) uint64 { + return c.lb.Select(req, c.svrs) } type abstractSupportProtectedRuntime struct {