metapb

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package metapb is a generated protocol buffer package.

It is generated from these files:

metapb.proto

It has these top-level messages:

Cluster
StoreLabel
Store
RegionEpoch
Region
Peer

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMetapb = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetapb   = fmt.Errorf("proto: integer overflow")
)
View Source
var StoreState_name = map[int32]string{
	0: "Up",
	1: "Offline",
	2: "Tombstone",
}
View Source
var StoreState_value = map[string]int32{
	"Up":        0,
	"Offline":   1,
	"Tombstone": 2,
}

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Id uint64 `protobuf:"varint,1,opt,name=id" json:"id"`
	// 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" json:"max_peer_count"`
	XXX_unrecognized []byte `json:"-"`
}

func (*Cluster) Descriptor

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

func (*Cluster) GetId

func (m *Cluster) GetId() uint64

func (*Cluster) GetMaxPeerCount

func (m *Cluster) GetMaxPeerCount() uint32

func (*Cluster) Marshal

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

func (*Cluster) MarshalTo

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

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) Reset

func (m *Cluster) Reset()

func (*Cluster) Size

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

func (*Cluster) String

func (m *Cluster) String() string

func (*Cluster) Unmarshal

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

type Peer

type Peer struct {
	Id               uint64 `protobuf:"varint,1,opt,name=id" json:"id"`
	StoreId          uint64 `protobuf:"varint,2,opt,name=store_id,json=storeId" json:"store_id"`
	XXX_unrecognized []byte `json:"-"`
}

func (*Peer) Descriptor

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

func (*Peer) GetId

func (m *Peer) GetId() uint64

func (*Peer) GetStoreId

func (m *Peer) GetStoreId() uint64

func (*Peer) Marshal

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

func (*Peer) MarshalTo

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

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) Reset

func (m *Peer) Reset()

func (*Peer) Size

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

func (*Peer) String

func (m *Peer) String() string

func (*Peer) Unmarshal

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

type Region

type Region struct {
	Id uint64 `protobuf:"varint,1,opt,name=id" json:"id"`
	// Region key range [start_key, end_key).
	StartKey         []byte       `protobuf:"bytes,2,opt,name=start_key,json=startKey" json:"start_key,omitempty"`
	EndKey           []byte       `protobuf:"bytes,3,opt,name=end_key,json=endKey" 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"`
	XXX_unrecognized []byte       `json:"-"`
}

func (*Region) Descriptor

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

func (*Region) GetEndKey

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

func (*Region) GetId

func (m *Region) GetId() uint64

func (*Region) GetPeers

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

func (*Region) GetRegionEpoch

func (m *Region) GetRegionEpoch() *RegionEpoch

func (*Region) GetStartKey

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

func (*Region) Marshal

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

func (*Region) MarshalTo

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

func (*Region) ProtoMessage

func (*Region) ProtoMessage()

func (*Region) Reset

func (m *Region) Reset()

func (*Region) Size

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

func (*Region) String

func (m *Region) String() string

func (*Region) Unmarshal

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

type RegionEpoch

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

func (*RegionEpoch) Descriptor

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

func (*RegionEpoch) GetConfVer

func (m *RegionEpoch) GetConfVer() uint64

func (*RegionEpoch) GetVersion

func (m *RegionEpoch) GetVersion() uint64

func (*RegionEpoch) Marshal

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

func (*RegionEpoch) MarshalTo

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

func (*RegionEpoch) ProtoMessage

func (*RegionEpoch) ProtoMessage()

func (*RegionEpoch) Reset

func (m *RegionEpoch) Reset()

func (*RegionEpoch) Size

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

func (*RegionEpoch) String

func (m *RegionEpoch) String() string

func (*RegionEpoch) Unmarshal

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

type Store

type Store struct {
	Id               uint64        `protobuf:"varint,1,opt,name=id" json:"id"`
	Address          string        `protobuf:"bytes,2,opt,name=address" json:"address"`
	State            StoreState    `protobuf:"varint,3,opt,name=state,enum=metapb.StoreState" json:"state"`
	Labels           []*StoreLabel `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty"`
	XXX_unrecognized []byte        `json:"-"`
}

func (*Store) Descriptor

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

func (*Store) GetAddress

func (m *Store) GetAddress() string

func (*Store) GetId

func (m *Store) GetId() uint64

func (*Store) GetLabels

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

func (*Store) GetState

func (m *Store) GetState() StoreState

func (*Store) Marshal

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

func (*Store) MarshalTo

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

func (*Store) ProtoMessage

func (*Store) ProtoMessage()

func (*Store) Reset

func (m *Store) Reset()

func (*Store) Size

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

func (*Store) String

func (m *Store) String() string

func (*Store) Unmarshal

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

type StoreLabel

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

Case insensitive key/value for replica constraints.

func (*StoreLabel) Descriptor

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

func (*StoreLabel) GetKey

func (m *StoreLabel) GetKey() string

func (*StoreLabel) GetValue

func (m *StoreLabel) GetValue() string

func (*StoreLabel) Marshal

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

func (*StoreLabel) MarshalTo

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

func (*StoreLabel) ProtoMessage

func (*StoreLabel) ProtoMessage()

func (*StoreLabel) Reset

func (m *StoreLabel) Reset()

func (*StoreLabel) Size

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

func (*StoreLabel) String

func (m *StoreLabel) String() string

func (*StoreLabel) Unmarshal

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

type StoreState

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

func (StoreState) Enum

func (x StoreState) Enum() *StoreState

func (StoreState) EnumDescriptor

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

func (StoreState) String

func (x StoreState) String() string

func (*StoreState) UnmarshalJSON

func (x *StoreState) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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