metapb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

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")
	ErrUnexpectedEndOfGroupMetapb = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Action_name = map[int32]string{
	0: "None",
	1: "ScaleOut",
}
View Source
var Action_value = map[string]int32{
	"None":     0,
	"ScaleOut": 1,
}
View Source
var ChangePeerType_name = map[int32]string{
	0: "AddNode",
	1: "RemoveNode",
	2: "AddLearnerNode",
	3: "ScalePeer",
}
View Source
var ChangePeerType_value = map[string]int32{
	"AddNode":        0,
	"RemoveNode":     1,
	"AddLearnerNode": 2,
	"ScalePeer":      3,
}
View Source
var CheckPolicy_name = map[int32]string{
	0: "SCAN",
	1: "APPROXIMATE",
	2: "USEKEY",
}
View Source
var CheckPolicy_value = map[string]int32{
	"SCAN":        0,
	"APPROXIMATE": 1,
	"USEKEY":      2,
}
View Source
var ContainerState_name = map[int32]string{
	0: "UP",
	1: "Offline",
	2: "Tombstone",
}
View Source
var ContainerState_value = map[string]int32{
	"UP":        0,
	"Offline":   1,
	"Tombstone": 2,
}
View Source
var OperatorStatus_name = map[int32]string{
	0: "SUCCESS",
	1: "TIMEOUT",
	2: "CANCEL",
	3: "REPLACE",
	4: "RUNNING",
}
View Source
var OperatorStatus_value = map[string]int32{
	"SUCCESS": 0,
	"TIMEOUT": 1,
	"CANCEL":  2,
	"REPLACE": 3,
	"RUNNING": 4,
}
View Source
var PeerRole_name = map[int32]string{
	0: "Voter",
	1: "Learner",
	2: "IncomingVoter",
	3: "DemotingVoter",
}
View Source
var PeerRole_value = map[string]int32{
	"Voter":         0,
	"Learner":       1,
	"IncomingVoter": 2,
	"DemotingVoter": 3,
}
View Source
var ResourceKind_name = map[int32]string{
	0: "LeaderKind",
	1: "ReplicaKind",
}
View Source
var ResourceKind_value = map[string]int32{
	"LeaderKind":  0,
	"ReplicaKind": 1,
}

Functions

This section is empty.

Types

type Action

type Action int32

Action the action while a new node join the cluster

const (
	Action_None     Action = 0
	Action_ScaleOut Action = 1
)

func (Action) EnumDescriptor

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

func (Action) String

func (x Action) String() string

type ChangePeerType

type ChangePeerType int32

ChangePeerType change peer type

const (
	ChangePeerType_AddNode        ChangePeerType = 0
	ChangePeerType_RemoveNode     ChangePeerType = 1
	ChangePeerType_AddLearnerNode ChangePeerType = 2
	ChangePeerType_ScalePeer      ChangePeerType = 3
)

func (ChangePeerType) EnumDescriptor

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

func (ChangePeerType) String

func (x ChangePeerType) String() string

type CheckPolicy

type CheckPolicy int32

CheckPolicy check policy

const (
	CheckPolicy_SCAN        CheckPolicy = 0
	CheckPolicy_APPROXIMATE CheckPolicy = 1
	CheckPolicy_USEKEY      CheckPolicy = 2
)

func (CheckPolicy) EnumDescriptor

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

func (CheckPolicy) String

func (x CheckPolicy) String() string

type Cluster

type Cluster struct {
	ID           uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	MaxPeerCount uint32 `protobuf:"varint,2,opt,name=maxPeerCount,proto3" json:"maxPeerCount,omitempty"`
}

Cluster prophet cluster

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) MarshalToSizedBuffer

func (m *Cluster) MarshalToSizedBuffer(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

func (*Cluster) XXX_DiscardUnknown

func (m *Cluster) XXX_DiscardUnknown()

func (*Cluster) XXX_Marshal

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

func (*Cluster) XXX_Merge

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

func (*Cluster) XXX_Size

func (m *Cluster) XXX_Size() int

func (*Cluster) XXX_Unmarshal

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

type ContainerState

type ContainerState int32

State the container state

const (
	// UP is normal state
	ContainerState_UP ContainerState = 0
	// Offline is the unavailable state
	ContainerState_Offline ContainerState = 1
	// Tombstone is the destory state
	ContainerState_Tombstone ContainerState = 2
)

func (ContainerState) EnumDescriptor

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

func (ContainerState) String

func (x ContainerState) String() string

type Member

type Member struct {
	ID   uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Addr string `protobuf:"bytes,3,opt,name=addr,proto3" json:"addr,omitempty"`
}

Member prophet member

func (*Member) Descriptor

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

func (*Member) GetAddr

func (m *Member) GetAddr() string

func (*Member) GetID

func (m *Member) GetID() uint64

func (*Member) GetName

func (m *Member) GetName() string

func (*Member) Marshal

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

func (*Member) MarshalTo

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

func (*Member) MarshalToSizedBuffer

func (m *Member) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Member) ProtoMessage

func (*Member) ProtoMessage()

func (*Member) Reset

func (m *Member) Reset()

func (*Member) Size

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

func (*Member) String

func (m *Member) String() string

func (*Member) Unmarshal

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

func (*Member) XXX_DiscardUnknown

func (m *Member) XXX_DiscardUnknown()

func (*Member) XXX_Marshal

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

func (*Member) XXX_Merge

func (m *Member) XXX_Merge(src proto.Message)

func (*Member) XXX_Size

func (m *Member) XXX_Size() int

func (*Member) XXX_Unmarshal

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

type OperatorStatus

type OperatorStatus int32

OperatorStatus Operator Status

const (
	OperatorStatus_SUCCESS OperatorStatus = 0
	OperatorStatus_TIMEOUT OperatorStatus = 1
	OperatorStatus_CANCEL  OperatorStatus = 2
	OperatorStatus_REPLACE OperatorStatus = 3
	OperatorStatus_RUNNING OperatorStatus = 4
)

func (OperatorStatus) EnumDescriptor

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

func (OperatorStatus) String

func (x OperatorStatus) String() string

type Pair

type Pair 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"`
}

Pair key value pair

func (*Pair) Descriptor

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

func (*Pair) GetKey

func (m *Pair) GetKey() string

func (*Pair) GetValue

func (m *Pair) GetValue() string

func (*Pair) Marshal

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

func (*Pair) MarshalTo

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

func (*Pair) MarshalToSizedBuffer

func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Pair) ProtoMessage

func (*Pair) ProtoMessage()

func (*Pair) Reset

func (m *Pair) Reset()

func (*Pair) Size

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

func (*Pair) String

func (m *Pair) String() string

func (*Pair) Unmarshal

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

func (*Pair) XXX_DiscardUnknown

func (m *Pair) XXX_DiscardUnknown()

func (*Pair) XXX_Marshal

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

func (*Pair) XXX_Merge

func (m *Pair) XXX_Merge(src proto.Message)

func (*Pair) XXX_Size

func (m *Pair) XXX_Size() int

func (*Pair) XXX_Unmarshal

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

type Peer

type Peer struct {
	ID          uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ContainerID uint64   `protobuf:"varint,2,opt,name=containerID,proto3" json:"containerID,omitempty"`
	Role        PeerRole `protobuf:"varint,3,opt,name=role,proto3,enum=metapb.PeerRole" json:"role,omitempty"`
}

Peer is a replica of the resource, we called peer

func (*Peer) Descriptor

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

func (*Peer) GetContainerID

func (m *Peer) GetContainerID() uint64

func (*Peer) GetID

func (m *Peer) GetID() uint64

func (*Peer) GetRole

func (m *Peer) GetRole() PeerRole

func (*Peer) Marshal

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

func (*Peer) MarshalTo

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

func (*Peer) MarshalToSizedBuffer

func (m *Peer) MarshalToSizedBuffer(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

func (*Peer) XXX_DiscardUnknown

func (m *Peer) XXX_DiscardUnknown()

func (*Peer) XXX_Marshal

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

func (*Peer) XXX_Merge

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

func (*Peer) XXX_Size

func (m *Peer) XXX_Size() int

func (*Peer) XXX_Unmarshal

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

type PeerRole

type PeerRole int32

PeerRole role of current peer

const (
	PeerRole_Voter         PeerRole = 0
	PeerRole_Learner       PeerRole = 1
	PeerRole_IncomingVoter PeerRole = 2
	PeerRole_DemotingVoter PeerRole = 3
)

func (PeerRole) EnumDescriptor

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

func (PeerRole) String

func (x PeerRole) String() string

type PeerStats

type PeerStats struct {
	Peer        Peer   `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer"`
	DownSeconds uint64 `protobuf:"varint,2,opt,name=downSeconds,proto3" json:"downSeconds,omitempty"`
}

PeerStats peer stats

func (*PeerStats) Descriptor

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

func (*PeerStats) GetDownSeconds

func (m *PeerStats) GetDownSeconds() uint64

func (*PeerStats) GetPeer

func (m *PeerStats) GetPeer() Peer

func (*PeerStats) Marshal

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

func (*PeerStats) MarshalTo

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

func (*PeerStats) MarshalToSizedBuffer

func (m *PeerStats) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerStats) ProtoMessage

func (*PeerStats) ProtoMessage()

func (*PeerStats) Reset

func (m *PeerStats) Reset()

func (*PeerStats) Size

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

func (*PeerStats) String

func (m *PeerStats) String() string

func (*PeerStats) Unmarshal

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

func (*PeerStats) XXX_DiscardUnknown

func (m *PeerStats) XXX_DiscardUnknown()

func (*PeerStats) XXX_Marshal

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

func (*PeerStats) XXX_Merge

func (m *PeerStats) XXX_Merge(src proto.Message)

func (*PeerStats) XXX_Size

func (m *PeerStats) XXX_Size() int

func (*PeerStats) XXX_Unmarshal

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

type ResourceEpoch

type ResourceEpoch struct {
	// Conf change version, auto increment when add or remove peer
	ConfVer uint64 `protobuf:"varint,1,opt,name=confVer,proto3" json:"confVer,omitempty"`
	// Resource version, auto increment when split or merge
	Version uint64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
}

ResourceEpoch resource epoch

func (*ResourceEpoch) Descriptor

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

func (*ResourceEpoch) GetConfVer

func (m *ResourceEpoch) GetConfVer() uint64

func (*ResourceEpoch) GetVersion

func (m *ResourceEpoch) GetVersion() uint64

func (*ResourceEpoch) Marshal

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

func (*ResourceEpoch) MarshalTo

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

func (*ResourceEpoch) MarshalToSizedBuffer

func (m *ResourceEpoch) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResourceEpoch) ProtoMessage

func (*ResourceEpoch) ProtoMessage()

func (*ResourceEpoch) Reset

func (m *ResourceEpoch) Reset()

func (*ResourceEpoch) Size

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

func (*ResourceEpoch) String

func (m *ResourceEpoch) String() string

func (*ResourceEpoch) Unmarshal

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

func (*ResourceEpoch) XXX_DiscardUnknown

func (m *ResourceEpoch) XXX_DiscardUnknown()

func (*ResourceEpoch) XXX_Marshal

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

func (*ResourceEpoch) XXX_Merge

func (m *ResourceEpoch) XXX_Merge(src proto.Message)

func (*ResourceEpoch) XXX_Size

func (m *ResourceEpoch) XXX_Size() int

func (*ResourceEpoch) XXX_Unmarshal

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

type ResourceKind

type ResourceKind int32

ResourceKind the resource king

const (
	ResourceKind_LeaderKind  ResourceKind = 0
	ResourceKind_ReplicaKind ResourceKind = 1
)

func (ResourceKind) EnumDescriptor

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

func (ResourceKind) String

func (x ResourceKind) String() string

type ResourceStat

type ResourceStat struct {
	// Bytes written for the container during this period.
	BytesWritten uint64 `protobuf:"varint,1,opt,name=bytesWritten,proto3" json:"bytesWritten,omitempty"`
	// Bytes read for the container during this period.
	BytesRead uint64 `protobuf:"varint,2,opt,name=bytesRead,proto3" json:"bytesRead,omitempty"`
	// Bytes written for the container during this period.
	KeysWritten uint64 `protobuf:"varint,3,opt,name=keysWritten,proto3" json:"keysWritten,omitempty"`
	// Bytes read for the container during this period.
	KeysRead uint64 `protobuf:"varint,4,opt,name=keysRead,proto3" json:"keysRead,omitempty"`
}

ResourceStat resource stat

func (*ResourceStat) Descriptor

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

func (*ResourceStat) GetBytesRead

func (m *ResourceStat) GetBytesRead() uint64

func (*ResourceStat) GetBytesWritten

func (m *ResourceStat) GetBytesWritten() uint64

func (*ResourceStat) GetKeysRead

func (m *ResourceStat) GetKeysRead() uint64

func (*ResourceStat) GetKeysWritten

func (m *ResourceStat) GetKeysWritten() uint64

func (*ResourceStat) Marshal

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

func (*ResourceStat) MarshalTo

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

func (*ResourceStat) MarshalToSizedBuffer

func (m *ResourceStat) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ResourceStat) ProtoMessage

func (*ResourceStat) ProtoMessage()

func (*ResourceStat) Reset

func (m *ResourceStat) Reset()

func (*ResourceStat) Size

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

func (*ResourceStat) String

func (m *ResourceStat) String() string

func (*ResourceStat) Unmarshal

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

func (*ResourceStat) XXX_DiscardUnknown

func (m *ResourceStat) XXX_DiscardUnknown()

func (*ResourceStat) XXX_Marshal

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

func (*ResourceStat) XXX_Merge

func (m *ResourceStat) XXX_Merge(src proto.Message)

func (*ResourceStat) XXX_Size

func (m *ResourceStat) XXX_Size() int

func (*ResourceStat) XXX_Unmarshal

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

type Timestamp

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"`
}

Timestamp tso timestamp

func (*Timestamp) Descriptor

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

func (*Timestamp) GetLogical

func (m *Timestamp) GetLogical() int64

func (*Timestamp) GetPhysical

func (m *Timestamp) GetPhysical() int64

func (*Timestamp) Marshal

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

func (*Timestamp) MarshalTo

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

func (*Timestamp) MarshalToSizedBuffer

func (m *Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) Reset

func (m *Timestamp) Reset()

func (*Timestamp) Size

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

func (*Timestamp) String

func (m *Timestamp) String() string

func (*Timestamp) Unmarshal

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

func (*Timestamp) XXX_DiscardUnknown

func (m *Timestamp) XXX_DiscardUnknown()

func (*Timestamp) XXX_Marshal

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

func (*Timestamp) XXX_Merge

func (m *Timestamp) XXX_Merge(src proto.Message)

func (*Timestamp) XXX_Size

func (m *Timestamp) XXX_Size() int

func (*Timestamp) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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