kvproto: github.com/pingcap/kvproto/pkg/metapb Index | Files

package metapb

import "github.com/pingcap/kvproto/pkg/metapb"

Index

Package Files

metapb.pb.go

Variables

var (
    ErrInvalidLengthMetapb = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowMetapb   = fmt.Errorf("proto: integer overflow")
)
var PeerRole_name = map[int32]string{
    0:  "Voter",
    1:  "Learner",
    2:  "IncomingVoter",
    3:  "DemotingVoter",
}
var PeerRole_value = map[string]int32{
    "Voter":         0,
    "Learner":       1,
    "IncomingVoter": 2,
    "DemotingVoter": 3,
}
var StoreState_name = map[int32]string{
    0:  "Up",
    1:  "Offline",
    2:  "Tombstone",
}
var StoreState_value = map[string]int32{
    "Up":        0,
    "Offline":   1,
    "Tombstone": 2,
}

type Cluster Uses

type Cluster struct {
    Id  uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
    // max peer count for a region.
    // pd will do the auto-balance if region peer count mismatches.
    MaxPeerCount         uint32   `protobuf:"varint,2,opt,name=max_peer_count,json=maxPeerCount,proto3" json:"max_peer_count,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Cluster) Descriptor Uses

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

func (*Cluster) GetId Uses

func (m *Cluster) GetId() uint64

func (*Cluster) GetMaxPeerCount Uses

func (m *Cluster) GetMaxPeerCount() uint32

func (*Cluster) Marshal Uses

func (m *Cluster) Marshal() (dAtA []byte, err error)

func (*Cluster) MarshalTo Uses

func (m *Cluster) MarshalTo(dAtA []byte) (int, error)

func (*Cluster) ProtoMessage Uses

func (*Cluster) ProtoMessage()

func (*Cluster) Reset Uses

func (m *Cluster) Reset()

func (*Cluster) Size Uses

func (m *Cluster) Size() (n int)

func (*Cluster) String Uses

func (m *Cluster) String() string

func (*Cluster) Unmarshal Uses

func (m *Cluster) Unmarshal(dAtA []byte) error

func (*Cluster) XXX_DiscardUnknown Uses

func (m *Cluster) XXX_DiscardUnknown()

func (*Cluster) XXX_Marshal Uses

func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Cluster) XXX_Merge Uses

func (dst *Cluster) XXX_Merge(src proto.Message)

func (*Cluster) XXX_Size Uses

func (m *Cluster) XXX_Size() int

func (*Cluster) XXX_Unmarshal Uses

func (m *Cluster) XXX_Unmarshal(b []byte) error

type Peer Uses

type Peer struct {
    Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
    StoreId              uint64   `protobuf:"varint,2,opt,name=store_id,json=storeId,proto3" json:"store_id,omitempty"`
    Role                 PeerRole `protobuf:"varint,3,opt,name=role,proto3,enum=metapb.PeerRole" json:"role,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Peer) Descriptor Uses

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

func (*Peer) GetId Uses

func (m *Peer) GetId() uint64

func (*Peer) GetRole Uses

func (m *Peer) GetRole() PeerRole

func (*Peer) GetStoreId Uses

func (m *Peer) GetStoreId() uint64

func (*Peer) Marshal Uses

func (m *Peer) Marshal() (dAtA []byte, err error)

func (*Peer) MarshalTo Uses

func (m *Peer) MarshalTo(dAtA []byte) (int, error)

func (*Peer) ProtoMessage Uses

func (*Peer) ProtoMessage()

func (*Peer) Reset Uses

func (m *Peer) Reset()

func (*Peer) Size Uses

func (m *Peer) Size() (n int)

func (*Peer) String Uses

func (m *Peer) String() string

func (*Peer) Unmarshal Uses

func (m *Peer) Unmarshal(dAtA []byte) error

func (*Peer) XXX_DiscardUnknown Uses

func (m *Peer) XXX_DiscardUnknown()

func (*Peer) XXX_Marshal Uses

func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Peer) XXX_Merge Uses

func (dst *Peer) XXX_Merge(src proto.Message)

func (*Peer) XXX_Size Uses

func (m *Peer) XXX_Size() int

func (*Peer) XXX_Unmarshal Uses

func (m *Peer) XXX_Unmarshal(b []byte) error

type PeerRole Uses

type PeerRole int32
const (
    // Voter -> Voter
    PeerRole_Voter PeerRole = 0
    // Learner/None -> Learner
    PeerRole_Learner PeerRole = 1
    // Learner/None -> Voter
    PeerRole_IncomingVoter PeerRole = 2
    // Voter -> Learner
    PeerRole_DemotingVoter PeerRole = 3
)

func (PeerRole) EnumDescriptor Uses

func (PeerRole) EnumDescriptor() ([]byte, []int)

func (PeerRole) String Uses

func (x PeerRole) String() string

type Region Uses

type Region struct {
    Id  uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
    // Region key range [start_key, end_key).
    StartKey    []byte       `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`
    EndKey      []byte       `protobuf:"bytes,3,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"`
    RegionEpoch *RegionEpoch `protobuf:"bytes,4,opt,name=region_epoch,json=regionEpoch" json:"region_epoch,omitempty"`
    Peers       []*Peer      `protobuf:"bytes,5,rep,name=peers" json:"peers,omitempty"`
    // Encryption metadata for start_key and end_key. encryption_meta.iv is IV for start_key.
    // IV for end_key is calculated from (encryption_meta.iv + len(start_key)).
    // The field is only used by PD and should be ignored otherwise.
    // If encryption_meta is empty (i.e. nil), it means start_key and end_key are unencrypted.
    EncryptionMeta       *encryptionpb.EncryptionMeta `protobuf:"bytes,6,opt,name=encryption_meta,json=encryptionMeta" json:"encryption_meta,omitempty"`
    XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
    XXX_unrecognized     []byte                       `json:"-"`
    XXX_sizecache        int32                        `json:"-"`
}

func (*Region) Descriptor Uses

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

func (*Region) GetEncryptionMeta Uses

func (m *Region) GetEncryptionMeta() *encryptionpb.EncryptionMeta

func (*Region) GetEndKey Uses

func (m *Region) GetEndKey() []byte

func (*Region) GetId Uses

func (m *Region) GetId() uint64

func (*Region) GetPeers Uses

func (m *Region) GetPeers() []*Peer

func (*Region) GetRegionEpoch Uses

func (m *Region) GetRegionEpoch() *RegionEpoch

func (*Region) GetStartKey Uses

func (m *Region) GetStartKey() []byte

func (*Region) Marshal Uses

func (m *Region) Marshal() (dAtA []byte, err error)

func (*Region) MarshalTo Uses

func (m *Region) MarshalTo(dAtA []byte) (int, error)

func (*Region) ProtoMessage Uses

func (*Region) ProtoMessage()

func (*Region) Reset Uses

func (m *Region) Reset()

func (*Region) Size Uses

func (m *Region) Size() (n int)

func (*Region) String Uses

func (m *Region) String() string

func (*Region) Unmarshal Uses

func (m *Region) Unmarshal(dAtA []byte) error

func (*Region) XXX_DiscardUnknown Uses

func (m *Region) XXX_DiscardUnknown()

func (*Region) XXX_Marshal Uses

func (m *Region) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Region) XXX_Merge Uses

func (dst *Region) XXX_Merge(src proto.Message)

func (*Region) XXX_Size Uses

func (m *Region) XXX_Size() int

func (*Region) XXX_Unmarshal Uses

func (m *Region) XXX_Unmarshal(b []byte) error

type RegionEpoch Uses

type RegionEpoch struct {
    // Conf change version, auto increment when add or remove peer
    ConfVer uint64 `protobuf:"varint,1,opt,name=conf_ver,json=confVer,proto3" json:"conf_ver,omitempty"`
    // Region version, auto increment when split or merge
    Version              uint64   `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*RegionEpoch) Descriptor Uses

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

func (*RegionEpoch) GetConfVer Uses

func (m *RegionEpoch) GetConfVer() uint64

func (*RegionEpoch) GetVersion Uses

func (m *RegionEpoch) GetVersion() uint64

func (*RegionEpoch) Marshal Uses

func (m *RegionEpoch) Marshal() (dAtA []byte, err error)

func (*RegionEpoch) MarshalTo Uses

func (m *RegionEpoch) MarshalTo(dAtA []byte) (int, error)

func (*RegionEpoch) ProtoMessage Uses

func (*RegionEpoch) ProtoMessage()

func (*RegionEpoch) Reset Uses

func (m *RegionEpoch) Reset()

func (*RegionEpoch) Size Uses

func (m *RegionEpoch) Size() (n int)

func (*RegionEpoch) String Uses

func (m *RegionEpoch) String() string

func (*RegionEpoch) Unmarshal Uses

func (m *RegionEpoch) Unmarshal(dAtA []byte) error

func (*RegionEpoch) XXX_DiscardUnknown Uses

func (m *RegionEpoch) XXX_DiscardUnknown()

func (*RegionEpoch) XXX_Marshal Uses

func (m *RegionEpoch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegionEpoch) XXX_Merge Uses

func (dst *RegionEpoch) XXX_Merge(src proto.Message)

func (*RegionEpoch) XXX_Size Uses

func (m *RegionEpoch) XXX_Size() int

func (*RegionEpoch) XXX_Unmarshal Uses

func (m *RegionEpoch) XXX_Unmarshal(b []byte) error

type Store Uses

type Store struct {
    Id  uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
    // Address to handle client requests (kv, cop, etc.)
    Address string        `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
    State   StoreState    `protobuf:"varint,3,opt,name=state,proto3,enum=metapb.StoreState" json:"state,omitempty"`
    Labels  []*StoreLabel `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty"`
    Version string        `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
    // Address to handle peer requests (raft messages from other store).
    // Empty means same as address.
    PeerAddress string `protobuf:"bytes,6,opt,name=peer_address,json=peerAddress,proto3" json:"peer_address,omitempty"`
    // Status address provides the HTTP service for external components
    StatusAddress string `protobuf:"bytes,7,opt,name=status_address,json=statusAddress,proto3" json:"status_address,omitempty"`
    GitHash       string `protobuf:"bytes,8,opt,name=git_hash,json=gitHash,proto3" json:"git_hash,omitempty"`
    // The start timestamp of the current store
    StartTimestamp int64  `protobuf:"varint,9,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
    DeployPath     string `protobuf:"bytes,10,opt,name=deploy_path,json=deployPath,proto3" json:"deploy_path,omitempty"`
    // The last heartbeat timestamp of the store.
    LastHeartbeat        int64    `protobuf:"varint,11,opt,name=last_heartbeat,json=lastHeartbeat,proto3" json:"last_heartbeat,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Store) Descriptor Uses

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

func (*Store) GetAddress Uses

func (m *Store) GetAddress() string

func (*Store) GetDeployPath Uses

func (m *Store) GetDeployPath() string

func (*Store) GetGitHash Uses

func (m *Store) GetGitHash() string

func (*Store) GetId Uses

func (m *Store) GetId() uint64

func (*Store) GetLabels Uses

func (m *Store) GetLabels() []*StoreLabel

func (*Store) GetLastHeartbeat Uses

func (m *Store) GetLastHeartbeat() int64

func (*Store) GetPeerAddress Uses

func (m *Store) GetPeerAddress() string

func (*Store) GetStartTimestamp Uses

func (m *Store) GetStartTimestamp() int64

func (*Store) GetState Uses

func (m *Store) GetState() StoreState

func (*Store) GetStatusAddress Uses

func (m *Store) GetStatusAddress() string

func (*Store) GetVersion Uses

func (m *Store) GetVersion() string

func (*Store) Marshal Uses

func (m *Store) Marshal() (dAtA []byte, err error)

func (*Store) MarshalTo Uses

func (m *Store) MarshalTo(dAtA []byte) (int, error)

func (*Store) ProtoMessage Uses

func (*Store) ProtoMessage()

func (*Store) Reset Uses

func (m *Store) Reset()

func (*Store) Size Uses

func (m *Store) Size() (n int)

func (*Store) String Uses

func (m *Store) String() string

func (*Store) Unmarshal Uses

func (m *Store) Unmarshal(dAtA []byte) error

func (*Store) XXX_DiscardUnknown Uses

func (m *Store) XXX_DiscardUnknown()

func (*Store) XXX_Marshal Uses

func (m *Store) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Store) XXX_Merge Uses

func (dst *Store) XXX_Merge(src proto.Message)

func (*Store) XXX_Size Uses

func (m *Store) XXX_Size() int

func (*Store) XXX_Unmarshal Uses

func (m *Store) XXX_Unmarshal(b []byte) error

type StoreLabel Uses

type StoreLabel struct {
    Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
    Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Case insensitive key/value for replica constraints.

func (*StoreLabel) Descriptor Uses

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

func (*StoreLabel) GetKey Uses

func (m *StoreLabel) GetKey() string

func (*StoreLabel) GetValue Uses

func (m *StoreLabel) GetValue() string

func (*StoreLabel) Marshal Uses

func (m *StoreLabel) Marshal() (dAtA []byte, err error)

func (*StoreLabel) MarshalTo Uses

func (m *StoreLabel) MarshalTo(dAtA []byte) (int, error)

func (*StoreLabel) ProtoMessage Uses

func (*StoreLabel) ProtoMessage()

func (*StoreLabel) Reset Uses

func (m *StoreLabel) Reset()

func (*StoreLabel) Size Uses

func (m *StoreLabel) Size() (n int)

func (*StoreLabel) String Uses

func (m *StoreLabel) String() string

func (*StoreLabel) Unmarshal Uses

func (m *StoreLabel) Unmarshal(dAtA []byte) error

func (*StoreLabel) XXX_DiscardUnknown Uses

func (m *StoreLabel) XXX_DiscardUnknown()

func (*StoreLabel) XXX_Marshal Uses

func (m *StoreLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StoreLabel) XXX_Merge Uses

func (dst *StoreLabel) XXX_Merge(src proto.Message)

func (*StoreLabel) XXX_Size Uses

func (m *StoreLabel) XXX_Size() int

func (*StoreLabel) XXX_Unmarshal Uses

func (m *StoreLabel) XXX_Unmarshal(b []byte) error

type StoreState Uses

type StoreState int32
const (
    StoreState_Up        StoreState = 0
    StoreState_Offline   StoreState = 1
    StoreState_Tombstone StoreState = 2
)

func (StoreState) EnumDescriptor Uses

func (StoreState) EnumDescriptor() ([]byte, []int)

func (StoreState) String Uses

func (x StoreState) String() string

Package metapb imports 6 packages (graph) and is imported by 215 packages. Updated 2020-09-24. Refresh now. Tools for package owners.