mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-02 00:45:30 +08:00
864 lines
28 KiB
Go
864 lines
28 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: pdpb.proto
|
|
|
|
package pdpb
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
metapb "github.com/czs007/suvlim/pkg/metapb"
|
|
proto "github.com/golang/protobuf/proto"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
type ErrorType int32
|
|
|
|
const (
|
|
ErrorType_OK ErrorType = 0
|
|
ErrorType_UNKNOWN ErrorType = 1
|
|
ErrorType_NOT_BOOTSTRAPPED ErrorType = 2
|
|
ErrorType_STORE_TOMBSTONE ErrorType = 3
|
|
ErrorType_ALREADY_BOOTSTRAPPED ErrorType = 4
|
|
ErrorType_INCOMPATIBLE_VERSION ErrorType = 5
|
|
ErrorType_REGION_NOT_FOUND ErrorType = 6
|
|
)
|
|
|
|
var ErrorType_name = map[int32]string{
|
|
0: "OK",
|
|
1: "UNKNOWN",
|
|
2: "NOT_BOOTSTRAPPED",
|
|
3: "STORE_TOMBSTONE",
|
|
4: "ALREADY_BOOTSTRAPPED",
|
|
5: "INCOMPATIBLE_VERSION",
|
|
6: "REGION_NOT_FOUND",
|
|
}
|
|
|
|
var ErrorType_value = map[string]int32{
|
|
"OK": 0,
|
|
"UNKNOWN": 1,
|
|
"NOT_BOOTSTRAPPED": 2,
|
|
"STORE_TOMBSTONE": 3,
|
|
"ALREADY_BOOTSTRAPPED": 4,
|
|
"INCOMPATIBLE_VERSION": 5,
|
|
"REGION_NOT_FOUND": 6,
|
|
}
|
|
|
|
func (x ErrorType) String() string {
|
|
return proto.EnumName(ErrorType_name, int32(x))
|
|
}
|
|
|
|
func (ErrorType) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{0}
|
|
}
|
|
|
|
type Member struct {
|
|
// name is the name of the PD member.
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
// member_id is the unique id of the PD member.
|
|
MemberId uint64 `protobuf:"varint,2,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`
|
|
PeerUrls []string `protobuf:"bytes,3,rep,name=peer_urls,json=peerUrls,proto3" json:"peer_urls,omitempty"`
|
|
ClientUrls []string `protobuf:"bytes,4,rep,name=client_urls,json=clientUrls,proto3" json:"client_urls,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Member) Reset() { *m = Member{} }
|
|
func (m *Member) String() string { return proto.CompactTextString(m) }
|
|
func (*Member) ProtoMessage() {}
|
|
func (*Member) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{0}
|
|
}
|
|
|
|
func (m *Member) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Member.Unmarshal(m, b)
|
|
}
|
|
func (m *Member) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Member.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *Member) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Member.Merge(m, src)
|
|
}
|
|
func (m *Member) XXX_Size() int {
|
|
return xxx_messageInfo_Member.Size(m)
|
|
}
|
|
func (m *Member) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Member.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Member proto.InternalMessageInfo
|
|
|
|
func (m *Member) GetName() string {
|
|
if m != nil {
|
|
return m.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Member) GetMemberId() uint64 {
|
|
if m != nil {
|
|
return m.MemberId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Member) GetPeerUrls() []string {
|
|
if m != nil {
|
|
return m.PeerUrls
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Member) GetClientUrls() []string {
|
|
if m != nil {
|
|
return m.ClientUrls
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type RequestHeader struct {
|
|
// cluster_id is the ID of the cluster which be sent to.
|
|
ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *RequestHeader) Reset() { *m = RequestHeader{} }
|
|
func (m *RequestHeader) String() string { return proto.CompactTextString(m) }
|
|
func (*RequestHeader) ProtoMessage() {}
|
|
func (*RequestHeader) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{1}
|
|
}
|
|
|
|
func (m *RequestHeader) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_RequestHeader.Unmarshal(m, b)
|
|
}
|
|
func (m *RequestHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_RequestHeader.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *RequestHeader) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_RequestHeader.Merge(m, src)
|
|
}
|
|
func (m *RequestHeader) XXX_Size() int {
|
|
return xxx_messageInfo_RequestHeader.Size(m)
|
|
}
|
|
func (m *RequestHeader) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_RequestHeader.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_RequestHeader proto.InternalMessageInfo
|
|
|
|
func (m *RequestHeader) GetClusterId() uint64 {
|
|
if m != nil {
|
|
return m.ClusterId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ResponseHeader struct {
|
|
// cluster_id is the ID of the cluster which sent the response.
|
|
ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
|
|
Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ResponseHeader) Reset() { *m = ResponseHeader{} }
|
|
func (m *ResponseHeader) String() string { return proto.CompactTextString(m) }
|
|
func (*ResponseHeader) ProtoMessage() {}
|
|
func (*ResponseHeader) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{2}
|
|
}
|
|
|
|
func (m *ResponseHeader) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ResponseHeader.Unmarshal(m, b)
|
|
}
|
|
func (m *ResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ResponseHeader.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ResponseHeader) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ResponseHeader.Merge(m, src)
|
|
}
|
|
func (m *ResponseHeader) XXX_Size() int {
|
|
return xxx_messageInfo_ResponseHeader.Size(m)
|
|
}
|
|
func (m *ResponseHeader) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ResponseHeader.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ResponseHeader proto.InternalMessageInfo
|
|
|
|
func (m *ResponseHeader) GetClusterId() uint64 {
|
|
if m != nil {
|
|
return m.ClusterId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *ResponseHeader) GetError() *Error {
|
|
if m != nil {
|
|
return m.Error
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Error struct {
|
|
Type ErrorType `protobuf:"varint,1,opt,name=type,proto3,enum=pdpb.ErrorType" json:"type,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Error) Reset() { *m = Error{} }
|
|
func (m *Error) String() string { return proto.CompactTextString(m) }
|
|
func (*Error) ProtoMessage() {}
|
|
func (*Error) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{3}
|
|
}
|
|
|
|
func (m *Error) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Error.Unmarshal(m, b)
|
|
}
|
|
func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Error.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *Error) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Error.Merge(m, src)
|
|
}
|
|
func (m *Error) XXX_Size() int {
|
|
return xxx_messageInfo_Error.Size(m)
|
|
}
|
|
func (m *Error) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Error.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Error proto.InternalMessageInfo
|
|
|
|
func (m *Error) GetType() ErrorType {
|
|
if m != nil {
|
|
return m.Type
|
|
}
|
|
return ErrorType_OK
|
|
}
|
|
|
|
func (m *Error) GetMessage() string {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type TsoRequest struct {
|
|
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
|
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *TsoRequest) Reset() { *m = TsoRequest{} }
|
|
func (m *TsoRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*TsoRequest) ProtoMessage() {}
|
|
func (*TsoRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{4}
|
|
}
|
|
|
|
func (m *TsoRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_TsoRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *TsoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_TsoRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *TsoRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TsoRequest.Merge(m, src)
|
|
}
|
|
func (m *TsoRequest) XXX_Size() int {
|
|
return xxx_messageInfo_TsoRequest.Size(m)
|
|
}
|
|
func (m *TsoRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TsoRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TsoRequest proto.InternalMessageInfo
|
|
|
|
func (m *TsoRequest) GetHeader() *RequestHeader {
|
|
if m != nil {
|
|
return m.Header
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TsoRequest) GetCount() uint32 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Timestamp struct {
|
|
Physical int64 `protobuf:"varint,1,opt,name=physical,proto3" json:"physical,omitempty"`
|
|
Logical int64 `protobuf:"varint,2,opt,name=logical,proto3" json:"logical,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Timestamp) Reset() { *m = Timestamp{} }
|
|
func (m *Timestamp) String() string { return proto.CompactTextString(m) }
|
|
func (*Timestamp) ProtoMessage() {}
|
|
func (*Timestamp) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{5}
|
|
}
|
|
|
|
func (m *Timestamp) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_Timestamp.Unmarshal(m, b)
|
|
}
|
|
func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *Timestamp) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Timestamp.Merge(m, src)
|
|
}
|
|
func (m *Timestamp) XXX_Size() int {
|
|
return xxx_messageInfo_Timestamp.Size(m)
|
|
}
|
|
func (m *Timestamp) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Timestamp.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Timestamp proto.InternalMessageInfo
|
|
|
|
func (m *Timestamp) GetPhysical() int64 {
|
|
if m != nil {
|
|
return m.Physical
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Timestamp) GetLogical() int64 {
|
|
if m != nil {
|
|
return m.Logical
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type TsoResponse struct {
|
|
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
|
Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
|
|
Timestamp *Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *TsoResponse) Reset() { *m = TsoResponse{} }
|
|
func (m *TsoResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*TsoResponse) ProtoMessage() {}
|
|
func (*TsoResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{6}
|
|
}
|
|
|
|
func (m *TsoResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_TsoResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *TsoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_TsoResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *TsoResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_TsoResponse.Merge(m, src)
|
|
}
|
|
func (m *TsoResponse) XXX_Size() int {
|
|
return xxx_messageInfo_TsoResponse.Size(m)
|
|
}
|
|
func (m *TsoResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_TsoResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_TsoResponse proto.InternalMessageInfo
|
|
|
|
func (m *TsoResponse) GetHeader() *ResponseHeader {
|
|
if m != nil {
|
|
return m.Header
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *TsoResponse) GetCount() uint32 {
|
|
if m != nil {
|
|
return m.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *TsoResponse) GetTimestamp() *Timestamp {
|
|
if m != nil {
|
|
return m.Timestamp
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AllocIDRequest struct {
|
|
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AllocIDRequest) Reset() { *m = AllocIDRequest{} }
|
|
func (m *AllocIDRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*AllocIDRequest) ProtoMessage() {}
|
|
func (*AllocIDRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{7}
|
|
}
|
|
|
|
func (m *AllocIDRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AllocIDRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *AllocIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AllocIDRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *AllocIDRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AllocIDRequest.Merge(m, src)
|
|
}
|
|
func (m *AllocIDRequest) XXX_Size() int {
|
|
return xxx_messageInfo_AllocIDRequest.Size(m)
|
|
}
|
|
func (m *AllocIDRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AllocIDRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AllocIDRequest proto.InternalMessageInfo
|
|
|
|
func (m *AllocIDRequest) GetHeader() *RequestHeader {
|
|
if m != nil {
|
|
return m.Header
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AllocIDResponse struct {
|
|
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
|
Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *AllocIDResponse) Reset() { *m = AllocIDResponse{} }
|
|
func (m *AllocIDResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*AllocIDResponse) ProtoMessage() {}
|
|
func (*AllocIDResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{8}
|
|
}
|
|
|
|
func (m *AllocIDResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_AllocIDResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *AllocIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_AllocIDResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *AllocIDResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_AllocIDResponse.Merge(m, src)
|
|
}
|
|
func (m *AllocIDResponse) XXX_Size() int {
|
|
return xxx_messageInfo_AllocIDResponse.Size(m)
|
|
}
|
|
func (m *AllocIDResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_AllocIDResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_AllocIDResponse proto.InternalMessageInfo
|
|
|
|
func (m *AllocIDResponse) GetHeader() *ResponseHeader {
|
|
if m != nil {
|
|
return m.Header
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *AllocIDResponse) GetId() uint64 {
|
|
if m != nil {
|
|
return m.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type HeartbeatRequest struct {
|
|
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
|
Peer *metapb.Peer `protobuf:"bytes,2,opt,name=peer,proto3" json:"peer,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *HeartbeatRequest) Reset() { *m = HeartbeatRequest{} }
|
|
func (m *HeartbeatRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*HeartbeatRequest) ProtoMessage() {}
|
|
func (*HeartbeatRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{9}
|
|
}
|
|
|
|
func (m *HeartbeatRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_HeartbeatRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *HeartbeatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_HeartbeatRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *HeartbeatRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HeartbeatRequest.Merge(m, src)
|
|
}
|
|
func (m *HeartbeatRequest) XXX_Size() int {
|
|
return xxx_messageInfo_HeartbeatRequest.Size(m)
|
|
}
|
|
func (m *HeartbeatRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HeartbeatRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HeartbeatRequest proto.InternalMessageInfo
|
|
|
|
func (m *HeartbeatRequest) GetHeader() *RequestHeader {
|
|
if m != nil {
|
|
return m.Header
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *HeartbeatRequest) GetPeer() *metapb.Peer {
|
|
if m != nil {
|
|
return m.Peer
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type HeartbeatResponse struct {
|
|
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} }
|
|
func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*HeartbeatResponse) ProtoMessage() {}
|
|
func (*HeartbeatResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_78b27e6f04f44c6e, []int{10}
|
|
}
|
|
|
|
func (m *HeartbeatResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_HeartbeatResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *HeartbeatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_HeartbeatResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *HeartbeatResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HeartbeatResponse.Merge(m, src)
|
|
}
|
|
func (m *HeartbeatResponse) XXX_Size() int {
|
|
return xxx_messageInfo_HeartbeatResponse.Size(m)
|
|
}
|
|
func (m *HeartbeatResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HeartbeatResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HeartbeatResponse proto.InternalMessageInfo
|
|
|
|
func (m *HeartbeatResponse) GetHeader() *ResponseHeader {
|
|
if m != nil {
|
|
return m.Header
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("pdpb.ErrorType", ErrorType_name, ErrorType_value)
|
|
proto.RegisterType((*Member)(nil), "pdpb.Member")
|
|
proto.RegisterType((*RequestHeader)(nil), "pdpb.RequestHeader")
|
|
proto.RegisterType((*ResponseHeader)(nil), "pdpb.ResponseHeader")
|
|
proto.RegisterType((*Error)(nil), "pdpb.Error")
|
|
proto.RegisterType((*TsoRequest)(nil), "pdpb.TsoRequest")
|
|
proto.RegisterType((*Timestamp)(nil), "pdpb.Timestamp")
|
|
proto.RegisterType((*TsoResponse)(nil), "pdpb.TsoResponse")
|
|
proto.RegisterType((*AllocIDRequest)(nil), "pdpb.AllocIDRequest")
|
|
proto.RegisterType((*AllocIDResponse)(nil), "pdpb.AllocIDResponse")
|
|
proto.RegisterType((*HeartbeatRequest)(nil), "pdpb.HeartbeatRequest")
|
|
proto.RegisterType((*HeartbeatResponse)(nil), "pdpb.HeartbeatResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("pdpb.proto", fileDescriptor_78b27e6f04f44c6e) }
|
|
|
|
var fileDescriptor_78b27e6f04f44c6e = []byte{
|
|
// 603 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x6f, 0xd3, 0x40,
|
|
0x10, 0xad, 0x1d, 0x27, 0xad, 0x27, 0x6d, 0xea, 0x4e, 0x03, 0x44, 0x41, 0x88, 0xb0, 0x5c, 0x22,
|
|
0x3e, 0xa2, 0x2a, 0x5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0x02, 0xbd, 0x9a, 0x26, 0x3e, 0xce, 0xb3, 0xb6,
|
|
0x37, 0xd8, 0x7d, 0xf2, 0x17, 0xbe, 0x59, 0x7d, 0xde, 0x90, 0xff, 0x73, 0xef, 0x7e, 0x07, 0x00,
|
|
0x00, 0xff, 0xff, 0x34, 0x73, 0xe9, 0xc4, 0x09, 0x05, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConnInterface
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion6
|
|
|
|
// PDClient is the client API for PD service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type PDClient interface {
|
|
Tso(ctx context.Context, opts ...grpc.CallOption) (PD_TsoClient, error)
|
|
AllocID(ctx context.Context, in *AllocIDRequest, opts ...grpc.CallOption) (*AllocIDResponse, error)
|
|
Heartbeat(ctx context.Context, opts ...grpc.CallOption) (PD_HeartbeatClient, error)
|
|
}
|
|
|
|
type pDClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewPDClient(cc grpc.ClientConnInterface) PDClient {
|
|
return &pDClient{cc}
|
|
}
|
|
|
|
func (c *pDClient) Tso(ctx context.Context, opts ...grpc.CallOption) (PD_TsoClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_PD_serviceDesc.Streams[0], "/pdpb.PD/Tso", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &pDTsoClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type PD_TsoClient interface {
|
|
Send(*TsoRequest) error
|
|
Recv() (*TsoResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type pDTsoClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *pDTsoClient) Send(m *TsoRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *pDTsoClient) Recv() (*TsoResponse, error) {
|
|
m := new(TsoResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *pDClient) AllocID(ctx context.Context, in *AllocIDRequest, opts ...grpc.CallOption) (*AllocIDResponse, error) {
|
|
out := new(AllocIDResponse)
|
|
err := c.cc.Invoke(ctx, "/pdpb.PD/AllocID", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *pDClient) Heartbeat(ctx context.Context, opts ...grpc.CallOption) (PD_HeartbeatClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_PD_serviceDesc.Streams[1], "/pdpb.PD/Heartbeat", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &pDHeartbeatClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type PD_HeartbeatClient interface {
|
|
Send(*HeartbeatRequest) error
|
|
Recv() (*HeartbeatResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type pDHeartbeatClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *pDHeartbeatClient) Send(m *HeartbeatRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *pDHeartbeatClient) Recv() (*HeartbeatResponse, error) {
|
|
m := new(HeartbeatResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// PDServer is the server API for PD service.
|
|
type PDServer interface {
|
|
Tso(PD_TsoServer) error
|
|
AllocID(context.Context, *AllocIDRequest) (*AllocIDResponse, error)
|
|
Heartbeat(PD_HeartbeatServer) error
|
|
}
|
|
|
|
// UnimplementedPDServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedPDServer struct {
|
|
}
|
|
|
|
func (*UnimplementedPDServer) Tso(srv PD_TsoServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method Tso not implemented")
|
|
}
|
|
func (*UnimplementedPDServer) AllocID(ctx context.Context, req *AllocIDRequest) (*AllocIDResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method AllocID not implemented")
|
|
}
|
|
func (*UnimplementedPDServer) Heartbeat(srv PD_HeartbeatServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method Heartbeat not implemented")
|
|
}
|
|
|
|
func RegisterPDServer(s *grpc.Server, srv PDServer) {
|
|
s.RegisterService(&_PD_serviceDesc, srv)
|
|
}
|
|
|
|
func _PD_Tso_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(PDServer).Tso(&pDTsoServer{stream})
|
|
}
|
|
|
|
type PD_TsoServer interface {
|
|
Send(*TsoResponse) error
|
|
Recv() (*TsoRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type pDTsoServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *pDTsoServer) Send(m *TsoResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *pDTsoServer) Recv() (*TsoRequest, error) {
|
|
m := new(TsoRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func _PD_AllocID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(AllocIDRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(PDServer).AllocID(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/pdpb.PD/AllocID",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PDServer).AllocID(ctx, req.(*AllocIDRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _PD_Heartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(PDServer).Heartbeat(&pDHeartbeatServer{stream})
|
|
}
|
|
|
|
type PD_HeartbeatServer interface {
|
|
Send(*HeartbeatResponse) error
|
|
Recv() (*HeartbeatRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type pDHeartbeatServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *pDHeartbeatServer) Send(m *HeartbeatResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *pDHeartbeatServer) Recv() (*HeartbeatRequest, error) {
|
|
m := new(HeartbeatRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
var _PD_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pdpb.PD",
|
|
HandlerType: (*PDServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "AllocID",
|
|
Handler: _PD_AllocID_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Tso",
|
|
Handler: _PD_Tso_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
{
|
|
StreamName: "Heartbeat",
|
|
Handler: _PD_Heartbeat_Handler,
|
|
ServerStreams: true,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "pdpb.proto",
|
|
}
|