syncerpb

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package syncerpb is a generated protocol buffer package.

It is generated from these files:

syncer.proto

It has these top-level messages:

RpcErr
RaftLogData
RaftReqs
RaftApplySnapReq
RaftApplySnapStatusReq
RaftApplySnapStatusRsp
SyncedRaftReq
SyncedRaftRsp

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthSyncer = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSyncer   = fmt.Errorf("proto: integer overflow")
)
View Source
var RaftApplySnapStatus_name = map[int32]string{
	0: "ApplyUnknown",
	1: "ApplyWaitingTransfer",
	2: "ApplyTransferSuccess",
	3: "ApplyWaiting",
	4: "ApplySuccess",
	5: "ApplyFailed",
	6: "ApplyMissing",
	7: "ApplyOutofdate",
}
View Source
var RaftApplySnapStatus_value = map[string]int32{
	"ApplyUnknown":         0,
	"ApplyWaitingTransfer": 1,
	"ApplyTransferSuccess": 2,
	"ApplyWaiting":         3,
	"ApplySuccess":         4,
	"ApplyFailed":          5,
	"ApplyMissing":         6,
	"ApplyOutofdate":       7,
}
View Source
var RaftApplySnapType_name = map[int32]string{
	0: "NormalSnap",
	1: "SkippedSnap",
}
View Source
var RaftApplySnapType_value = map[string]int32{
	"NormalSnap":  0,
	"SkippedSnap": 1,
}
View Source
var RaftLogType_name = map[int32]string{
	0: "EntryNormalRaw",
	1: "EntrySnapshotRawKV",
}
View Source
var RaftLogType_value = map[string]int32{
	"EntryNormalRaw":     0,
	"EntrySnapshotRawKV": 1,
}

Functions

func RegisterCrossClusterAPIServer

func RegisterCrossClusterAPIServer(s *grpc.Server, srv CrossClusterAPIServer)

Types

type CrossClusterAPIClient

type CrossClusterAPIClient interface {
	ApplyRaftReqs(ctx context.Context, in *RaftReqs, opts ...grpc.CallOption) (*RpcErr, error)
	GetSyncedRaft(ctx context.Context, in *SyncedRaftReq, opts ...grpc.CallOption) (*SyncedRaftRsp, error)
	NotifyTransferSnap(ctx context.Context, in *RaftApplySnapReq, opts ...grpc.CallOption) (*RpcErr, error)
	NotifyApplySnap(ctx context.Context, in *RaftApplySnapReq, opts ...grpc.CallOption) (*RpcErr, error)
	GetApplySnapStatus(ctx context.Context, in *RaftApplySnapStatusReq, opts ...grpc.CallOption) (*RaftApplySnapStatusRsp, error)
}

func NewCrossClusterAPIClient

func NewCrossClusterAPIClient(cc *grpc.ClientConn) CrossClusterAPIClient

type CrossClusterAPIServer

type CrossClusterAPIServer interface {
	ApplyRaftReqs(context.Context, *RaftReqs) (*RpcErr, error)
	GetSyncedRaft(context.Context, *SyncedRaftReq) (*SyncedRaftRsp, error)
	NotifyTransferSnap(context.Context, *RaftApplySnapReq) (*RpcErr, error)
	NotifyApplySnap(context.Context, *RaftApplySnapReq) (*RpcErr, error)
	GetApplySnapStatus(context.Context, *RaftApplySnapStatusReq) (*RaftApplySnapStatusRsp, error)
}

type RaftApplySnapReq

type RaftApplySnapReq struct {
	Type RaftApplySnapType `protobuf:"varint,1,opt,name=type,proto3,enum=syncerpb.RaftApplySnapType" json:"type,omitempty"`
	// the name for source cluster, if there are multi different source clusters for syncer,
	// we can separate them.
	ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
	// raft group for different partition has different name, so
	// we can make sure (term-index) is increased in same raft group.
	// (term-index) will be checked while replaying in remote cluster
	RaftGroupName string `protobuf:"bytes,3,opt,name=raft_group_name,json=raftGroupName,proto3" json:"raft_group_name,omitempty"`
	Term          uint64 `protobuf:"varint,4,opt,name=term,proto3" json:"term,omitempty"`
	Index         uint64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
	RaftTimestamp int64  `protobuf:"varint,6,opt,name=raft_timestamp,json=raftTimestamp,proto3" json:"raft_timestamp,omitempty"`
	SyncAddr      string `protobuf:"bytes,7,opt,name=sync_addr,json=syncAddr,proto3" json:"sync_addr,omitempty"`
	SyncPath      string `protobuf:"bytes,8,opt,name=sync_path,json=syncPath,proto3" json:"sync_path,omitempty"`
	Data          []byte `protobuf:"bytes,9,opt,name=data,proto3" json:"data,omitempty"`
}

func (*RaftApplySnapReq) Descriptor

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

func (*RaftApplySnapReq) Marshal

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

func (*RaftApplySnapReq) MarshalTo

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

func (*RaftApplySnapReq) ProtoMessage

func (*RaftApplySnapReq) ProtoMessage()

func (*RaftApplySnapReq) Reset

func (m *RaftApplySnapReq) Reset()

func (*RaftApplySnapReq) Size

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

func (*RaftApplySnapReq) String

func (m *RaftApplySnapReq) String() string

func (*RaftApplySnapReq) Unmarshal

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

type RaftApplySnapStatus

type RaftApplySnapStatus int32
const (
	ApplyUnknown         RaftApplySnapStatus = 0
	ApplyWaitingTransfer RaftApplySnapStatus = 1
	ApplyTransferSuccess RaftApplySnapStatus = 2
	ApplyWaiting         RaftApplySnapStatus = 3
	ApplySuccess         RaftApplySnapStatus = 4
	ApplyFailed          RaftApplySnapStatus = 5
	ApplyMissing         RaftApplySnapStatus = 6
	ApplyOutofdate       RaftApplySnapStatus = 7
)

func (RaftApplySnapStatus) EnumDescriptor

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

func (RaftApplySnapStatus) String

func (x RaftApplySnapStatus) String() string

type RaftApplySnapStatusReq

type RaftApplySnapStatusReq struct {
	// the name for source cluster, if there are multi different source clusters for syncer,
	// we can separate them.
	ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
	// raft group for different partition has different name, so
	// we can make sure (term-index) is increased in same raft group.
	// (term-index) will be checked while replaying in remote cluster
	RaftGroupName string `protobuf:"bytes,3,opt,name=raft_group_name,json=raftGroupName,proto3" json:"raft_group_name,omitempty"`
	Term          uint64 `protobuf:"varint,4,opt,name=term,proto3" json:"term,omitempty"`
	Index         uint64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
}

func (*RaftApplySnapStatusReq) Descriptor

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

func (*RaftApplySnapStatusReq) Marshal

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

func (*RaftApplySnapStatusReq) MarshalTo

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

func (*RaftApplySnapStatusReq) ProtoMessage

func (*RaftApplySnapStatusReq) ProtoMessage()

func (*RaftApplySnapStatusReq) Reset

func (m *RaftApplySnapStatusReq) Reset()

func (*RaftApplySnapStatusReq) Size

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

func (*RaftApplySnapStatusReq) String

func (m *RaftApplySnapStatusReq) String() string

func (*RaftApplySnapStatusReq) Unmarshal

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

type RaftApplySnapStatusRsp

type RaftApplySnapStatusRsp struct {
	Status    RaftApplySnapStatus `protobuf:"varint,1,opt,name=status,proto3,enum=syncerpb.RaftApplySnapStatus" json:"status,omitempty"`
	Progress  uint64              `protobuf:"varint,2,opt,name=progress,proto3" json:"progress,omitempty"`
	StatusMsg string              `protobuf:"bytes,3,opt,name=status_msg,json=statusMsg,proto3" json:"status_msg,omitempty"`
}

func (*RaftApplySnapStatusRsp) Descriptor

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

func (*RaftApplySnapStatusRsp) Marshal

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

func (*RaftApplySnapStatusRsp) MarshalTo

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

func (*RaftApplySnapStatusRsp) ProtoMessage

func (*RaftApplySnapStatusRsp) ProtoMessage()

func (*RaftApplySnapStatusRsp) Reset

func (m *RaftApplySnapStatusRsp) Reset()

func (*RaftApplySnapStatusRsp) Size

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

func (*RaftApplySnapStatusRsp) String

func (m *RaftApplySnapStatusRsp) String() string

func (*RaftApplySnapStatusRsp) Unmarshal

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

type RaftApplySnapType

type RaftApplySnapType int32
const (
	NormalSnap  RaftApplySnapType = 0
	SkippedSnap RaftApplySnapType = 1
)

func (RaftApplySnapType) EnumDescriptor

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

func (RaftApplySnapType) String

func (x RaftApplySnapType) String() string

type RaftLogData

type RaftLogData struct {
	Type RaftLogType `protobuf:"varint,1,opt,name=type,proto3,enum=syncerpb.RaftLogType" json:"type,omitempty"`
	// the name for source cluster, if there are multi different source clusters for syncer,
	// we can separate them.
	ClusterName string `protobuf:"bytes,2,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
	// raft group for different partition has different name, so
	// we can make sure (term-index) is increased in same raft group.
	// (term-index) will be checked while replaying in remote cluster
	RaftGroupName string `protobuf:"bytes,3,opt,name=raft_group_name,json=raftGroupName,proto3" json:"raft_group_name,omitempty"`
	Term          uint64 `protobuf:"varint,4,opt,name=term,proto3" json:"term,omitempty"`
	Index         uint64 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"`
	RaftTimestamp int64  `protobuf:"varint,6,opt,name=raft_timestamp,json=raftTimestamp,proto3" json:"raft_timestamp,omitempty"`
	Data          []byte `protobuf:"bytes,15,opt,name=data,proto3" json:"data,omitempty"`
}

func (*RaftLogData) Descriptor

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

func (*RaftLogData) Marshal

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

func (*RaftLogData) MarshalTo

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

func (*RaftLogData) ProtoMessage

func (*RaftLogData) ProtoMessage()

func (*RaftLogData) Reset

func (m *RaftLogData) Reset()

func (*RaftLogData) Size

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

func (*RaftLogData) String

func (m *RaftLogData) String() string

func (*RaftLogData) Unmarshal

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

type RaftLogType

type RaftLogType int32
const (
	// indicate what stored in the data in raftlog
	EntryNormalRaw     RaftLogType = 0
	EntrySnapshotRawKV RaftLogType = 1
)

func (RaftLogType) EnumDescriptor

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

func (RaftLogType) String

func (x RaftLogType) String() string

type RaftReqs

type RaftReqs struct {
	RaftLog []*RaftLogData `protobuf:"bytes,1,rep,name=raft_log,json=raftLog" json:"raft_log,omitempty"`
}

func (*RaftReqs) Descriptor

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

func (*RaftReqs) Marshal

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

func (*RaftReqs) MarshalTo

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

func (*RaftReqs) ProtoMessage

func (*RaftReqs) ProtoMessage()

func (*RaftReqs) Reset

func (m *RaftReqs) Reset()

func (*RaftReqs) Size

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

func (*RaftReqs) String

func (m *RaftReqs) String() string

func (*RaftReqs) Unmarshal

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

type RpcErr

type RpcErr struct {
	ErrType int32  `protobuf:"varint,1,opt,name=err_type,json=errType,proto3" json:"err_type,omitempty"`
	ErrCode int32  `protobuf:"varint,2,opt,name=err_code,json=errCode,proto3" json:"err_code,omitempty"`
	ErrMsg  string `protobuf:"bytes,3,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
}

func (*RpcErr) Descriptor

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

func (*RpcErr) Marshal

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

func (*RpcErr) MarshalTo

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

func (*RpcErr) ProtoMessage

func (*RpcErr) ProtoMessage()

func (*RpcErr) Reset

func (m *RpcErr) Reset()

func (*RpcErr) Size

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

func (*RpcErr) String

func (m *RpcErr) String() string

func (*RpcErr) Unmarshal

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

type SyncedRaftReq

type SyncedRaftReq struct {
	ClusterName   string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
	RaftGroupName string `protobuf:"bytes,2,opt,name=raft_group_name,json=raftGroupName,proto3" json:"raft_group_name,omitempty"`
}

func (*SyncedRaftReq) Descriptor

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

func (*SyncedRaftReq) Marshal

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

func (*SyncedRaftReq) MarshalTo

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

func (*SyncedRaftReq) ProtoMessage

func (*SyncedRaftReq) ProtoMessage()

func (*SyncedRaftReq) Reset

func (m *SyncedRaftReq) Reset()

func (*SyncedRaftReq) Size

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

func (*SyncedRaftReq) String

func (m *SyncedRaftReq) String() string

func (*SyncedRaftReq) Unmarshal

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

type SyncedRaftRsp

type SyncedRaftRsp struct {
	Term  uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
	Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
}

func (*SyncedRaftRsp) Descriptor

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

func (*SyncedRaftRsp) Marshal

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

func (*SyncedRaftRsp) MarshalTo

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

func (*SyncedRaftRsp) ProtoMessage

func (*SyncedRaftRsp) ProtoMessage()

func (*SyncedRaftRsp) Reset

func (m *SyncedRaftRsp) Reset()

func (*SyncedRaftRsp) Size

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

func (*SyncedRaftRsp) String

func (m *SyncedRaftRsp) String() string

func (*SyncedRaftRsp) Unmarshal

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

Jump to

Keyboard shortcuts

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