// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: syncer.proto

package syncerpb

import (
	context "context"
	fmt "fmt"
	_ "github.com/gogo/protobuf/gogoproto"
	proto "github.com/gogo/protobuf/proto"
	grpc "google.golang.org/grpc"
	io "io"
	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.GoGoProtoPackageIsVersion2 // please upgrade the proto package

type RaftLogType int32

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

var RaftLogType_name = map[int32]string{
	0: "EntryNormalRaw",
	1: "EntrySnapshotRawKV",
}

var RaftLogType_value = map[string]int32{
	"EntryNormalRaw":     0,
	"EntrySnapshotRawKV": 1,
}

func (x RaftLogType) String() string {
	return proto.EnumName(RaftLogType_name, int32(x))
}

func (RaftLogType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{0}
}

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
	ApplyWaitingBegin    RaftApplySnapStatus = 8
)

var RaftApplySnapStatus_name = map[int32]string{
	0: "ApplyUnknown",
	1: "ApplyWaitingTransfer",
	2: "ApplyTransferSuccess",
	3: "ApplyWaiting",
	4: "ApplySuccess",
	5: "ApplyFailed",
	6: "ApplyMissing",
	7: "ApplyOutofdate",
	8: "ApplyWaitingBegin",
}

var RaftApplySnapStatus_value = map[string]int32{
	"ApplyUnknown":         0,
	"ApplyWaitingTransfer": 1,
	"ApplyTransferSuccess": 2,
	"ApplyWaiting":         3,
	"ApplySuccess":         4,
	"ApplyFailed":          5,
	"ApplyMissing":         6,
	"ApplyOutofdate":       7,
	"ApplyWaitingBegin":    8,
}

func (x RaftApplySnapStatus) String() string {
	return proto.EnumName(RaftApplySnapStatus_name, int32(x))
}

func (RaftApplySnapStatus) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{1}
}

type RaftApplySnapType int32

const (
	NormalSnap  RaftApplySnapType = 0
	SkippedSnap RaftApplySnapType = 1
)

var RaftApplySnapType_name = map[int32]string{
	0: "NormalSnap",
	1: "SkippedSnap",
}

var RaftApplySnapType_value = map[string]int32{
	"NormalSnap":  0,
	"SkippedSnap": 1,
}

func (x RaftApplySnapType) String() string {
	return proto.EnumName(RaftApplySnapType_name, int32(x))
}

func (RaftApplySnapType) EnumDescriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{2}
}

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 (m *RpcErr) Reset()         { *m = RpcErr{} }
func (m *RpcErr) String() string { return proto.CompactTextString(m) }
func (*RpcErr) ProtoMessage()    {}
func (*RpcErr) Descriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{0}
}
func (m *RpcErr) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RpcErr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RpcErr.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RpcErr) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RpcErr.Merge(m, src)
}
func (m *RpcErr) XXX_Size() int {
	return m.Size()
}
func (m *RpcErr) XXX_DiscardUnknown() {
	xxx_messageInfo_RpcErr.DiscardUnknown(m)
}

var xxx_messageInfo_RpcErr proto.InternalMessageInfo

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 (m *RaftLogData) Reset()         { *m = RaftLogData{} }
func (m *RaftLogData) String() string { return proto.CompactTextString(m) }
func (*RaftLogData) ProtoMessage()    {}
func (*RaftLogData) Descriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{1}
}
func (m *RaftLogData) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RaftLogData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RaftLogData.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RaftLogData) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RaftLogData.Merge(m, src)
}
func (m *RaftLogData) XXX_Size() int {
	return m.Size()
}
func (m *RaftLogData) XXX_DiscardUnknown() {
	xxx_messageInfo_RaftLogData.DiscardUnknown(m)
}

var xxx_messageInfo_RaftLogData proto.InternalMessageInfo

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

func (m *RaftReqs) Reset()         { *m = RaftReqs{} }
func (m *RaftReqs) String() string { return proto.CompactTextString(m) }
func (*RaftReqs) ProtoMessage()    {}
func (*RaftReqs) Descriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{2}
}
func (m *RaftReqs) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RaftReqs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RaftReqs.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RaftReqs) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RaftReqs.Merge(m, src)
}
func (m *RaftReqs) XXX_Size() int {
	return m.Size()
}
func (m *RaftReqs) XXX_DiscardUnknown() {
	xxx_messageInfo_RaftReqs.DiscardUnknown(m)
}

var xxx_messageInfo_RaftReqs proto.InternalMessageInfo

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 (m *RaftApplySnapReq) Reset()         { *m = RaftApplySnapReq{} }
func (m *RaftApplySnapReq) String() string { return proto.CompactTextString(m) }
func (*RaftApplySnapReq) ProtoMessage()    {}
func (*RaftApplySnapReq) Descriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{3}
}
func (m *RaftApplySnapReq) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RaftApplySnapReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RaftApplySnapReq.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RaftApplySnapReq) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RaftApplySnapReq.Merge(m, src)
}
func (m *RaftApplySnapReq) XXX_Size() int {
	return m.Size()
}
func (m *RaftApplySnapReq) XXX_DiscardUnknown() {
	xxx_messageInfo_RaftApplySnapReq.DiscardUnknown(m)
}

var xxx_messageInfo_RaftApplySnapReq proto.InternalMessageInfo

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 (m *RaftApplySnapStatusReq) Reset()         { *m = RaftApplySnapStatusReq{} }
func (m *RaftApplySnapStatusReq) String() string { return proto.CompactTextString(m) }
func (*RaftApplySnapStatusReq) ProtoMessage()    {}
func (*RaftApplySnapStatusReq) Descriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{4}
}
func (m *RaftApplySnapStatusReq) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RaftApplySnapStatusReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RaftApplySnapStatusReq.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RaftApplySnapStatusReq) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RaftApplySnapStatusReq.Merge(m, src)
}
func (m *RaftApplySnapStatusReq) XXX_Size() int {
	return m.Size()
}
func (m *RaftApplySnapStatusReq) XXX_DiscardUnknown() {
	xxx_messageInfo_RaftApplySnapStatusReq.DiscardUnknown(m)
}

var xxx_messageInfo_RaftApplySnapStatusReq proto.InternalMessageInfo

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 (m *RaftApplySnapStatusRsp) Reset()         { *m = RaftApplySnapStatusRsp{} }
func (m *RaftApplySnapStatusRsp) String() string { return proto.CompactTextString(m) }
func (*RaftApplySnapStatusRsp) ProtoMessage()    {}
func (*RaftApplySnapStatusRsp) Descriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{5}
}
func (m *RaftApplySnapStatusRsp) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *RaftApplySnapStatusRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_RaftApplySnapStatusRsp.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *RaftApplySnapStatusRsp) XXX_Merge(src proto.Message) {
	xxx_messageInfo_RaftApplySnapStatusRsp.Merge(m, src)
}
func (m *RaftApplySnapStatusRsp) XXX_Size() int {
	return m.Size()
}
func (m *RaftApplySnapStatusRsp) XXX_DiscardUnknown() {
	xxx_messageInfo_RaftApplySnapStatusRsp.DiscardUnknown(m)
}

var xxx_messageInfo_RaftApplySnapStatusRsp proto.InternalMessageInfo

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 (m *SyncedRaftReq) Reset()         { *m = SyncedRaftReq{} }
func (m *SyncedRaftReq) String() string { return proto.CompactTextString(m) }
func (*SyncedRaftReq) ProtoMessage()    {}
func (*SyncedRaftReq) Descriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{6}
}
func (m *SyncedRaftReq) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *SyncedRaftReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_SyncedRaftReq.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *SyncedRaftReq) XXX_Merge(src proto.Message) {
	xxx_messageInfo_SyncedRaftReq.Merge(m, src)
}
func (m *SyncedRaftReq) XXX_Size() int {
	return m.Size()
}
func (m *SyncedRaftReq) XXX_DiscardUnknown() {
	xxx_messageInfo_SyncedRaftReq.DiscardUnknown(m)
}

var xxx_messageInfo_SyncedRaftReq proto.InternalMessageInfo

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"`
	Timestamp int64  `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
}

func (m *SyncedRaftRsp) Reset()         { *m = SyncedRaftRsp{} }
func (m *SyncedRaftRsp) String() string { return proto.CompactTextString(m) }
func (*SyncedRaftRsp) ProtoMessage()    {}
func (*SyncedRaftRsp) Descriptor() ([]byte, []int) {
	return fileDescriptor_9577b640f2aab197, []int{7}
}
func (m *SyncedRaftRsp) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *SyncedRaftRsp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_SyncedRaftRsp.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalTo(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *SyncedRaftRsp) XXX_Merge(src proto.Message) {
	xxx_messageInfo_SyncedRaftRsp.Merge(m, src)
}
func (m *SyncedRaftRsp) XXX_Size() int {
	return m.Size()
}
func (m *SyncedRaftRsp) XXX_DiscardUnknown() {
	xxx_messageInfo_SyncedRaftRsp.DiscardUnknown(m)
}

var xxx_messageInfo_SyncedRaftRsp proto.InternalMessageInfo

func init() {
	proto.RegisterEnum("syncerpb.RaftLogType", RaftLogType_name, RaftLogType_value)
	proto.RegisterEnum("syncerpb.RaftApplySnapStatus", RaftApplySnapStatus_name, RaftApplySnapStatus_value)
	proto.RegisterEnum("syncerpb.RaftApplySnapType", RaftApplySnapType_name, RaftApplySnapType_value)
	proto.RegisterType((*RpcErr)(nil), "syncerpb.RpcErr")
	proto.RegisterType((*RaftLogData)(nil), "syncerpb.RaftLogData")
	proto.RegisterType((*RaftReqs)(nil), "syncerpb.RaftReqs")
	proto.RegisterType((*RaftApplySnapReq)(nil), "syncerpb.RaftApplySnapReq")
	proto.RegisterType((*RaftApplySnapStatusReq)(nil), "syncerpb.RaftApplySnapStatusReq")
	proto.RegisterType((*RaftApplySnapStatusRsp)(nil), "syncerpb.RaftApplySnapStatusRsp")
	proto.RegisterType((*SyncedRaftReq)(nil), "syncerpb.SyncedRaftReq")
	proto.RegisterType((*SyncedRaftRsp)(nil), "syncerpb.SyncedRaftRsp")
}

func init() { proto.RegisterFile("syncer.proto", fileDescriptor_9577b640f2aab197) }

var fileDescriptor_9577b640f2aab197 = []byte{
	// 800 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0xdd, 0x6e, 0x23, 0x35,
	0x14, 0x1e, 0xe7, 0x3f, 0x27, 0x7f, 0xb3, 0xa6, 0xbb, 0x3b, 0x64, 0xd9, 0x61, 0x18, 0x09, 0x14,
	0x7a, 0xd1, 0x95, 0x96, 0x3f, 0x71, 0x99, 0x64, 0x97, 0x0a, 0xc1, 0x96, 0xd5, 0xa4, 0x50, 0xa9,
	0x37, 0x91, 0x9b, 0x71, 0xa6, 0xa3, 0x26, 0x63, 0xd7, 0x76, 0x54, 0xf2, 0x0a, 0x48, 0x48, 0xbc,
	0x08, 0xef, 0xd1, 0x1b, 0xa4, 0x5e, 0x72, 0x85, 0x68, 0x7b, 0xc3, 0x03, 0xf0, 0x00, 0xc8, 0x9e,
	0x64, 0x92, 0xa8, 0x29, 0x3f, 0x57, 0x68, 0xef, 0xec, 0xef, 0x7c, 0xfe, 0x8e, 0xcf, 0xe7, 0x63,
	0x1b, 0xea, 0x72, 0x9e, 0x8c, 0xa8, 0xd8, 0xe3, 0x82, 0x29, 0x86, 0x2b, 0xe9, 0x8c, 0x9f, 0xb4,
	0x77, 0x22, 0x16, 0x31, 0x03, 0x3e, 0xd3, 0xa3, 0x34, 0xee, 0x1f, 0x41, 0x29, 0xe0, 0xa3, 0x97,
	0x42, 0xe0, 0xb7, 0xa1, 0x42, 0x85, 0x18, 0xaa, 0x39, 0xa7, 0x0e, 0xf2, 0x50, 0xa7, 0x18, 0x94,
	0xa9, 0x10, 0x87, 0x73, 0x4e, 0x97, 0xa1, 0x11, 0x0b, 0xa9, 0x93, 0xcb, 0x42, 0x7d, 0x16, 0x52,
	0xfc, 0x18, 0xf4, 0x70, 0x38, 0x95, 0x91, 0x93, 0xf7, 0x50, 0xa7, 0x1a, 0x94, 0xa8, 0x10, 0xaf,
	0x64, 0xe4, 0xff, 0x81, 0xa0, 0x16, 0x90, 0xb1, 0xfa, 0x9a, 0x45, 0x2f, 0x88, 0x22, 0xf8, 0x43,
	0x28, 0x64, 0xd2, 0xcd, 0xe7, 0x0f, 0xf7, 0x96, 0xfb, 0xda, 0x5b, 0x90, 0x74, 0xa2, 0xc0, 0x50,
	0xf0, 0x7b, 0x50, 0x1f, 0x4d, 0x66, 0x52, 0x51, 0x31, 0x4c, 0xc8, 0x34, 0x4d, 0x59, 0x0d, 0x6a,
	0x0b, 0xec, 0x80, 0x4c, 0x29, 0xfe, 0x00, 0x5a, 0x82, 0x8c, 0xd5, 0x30, 0x12, 0x6c, 0xc6, 0x53,
	0x56, 0x9a, 0xbe, 0xa1, 0xe1, 0x7d, 0x8d, 0x1a, 0x1e, 0x86, 0x82, 0xa2, 0x62, 0xea, 0x14, 0x3c,
	0xd4, 0x29, 0x04, 0x66, 0x8c, 0x77, 0xa0, 0x18, 0x27, 0x21, 0xfd, 0xde, 0x29, 0x1a, 0x30, 0x9d,
	0xe0, 0xf7, 0xa1, 0x69, 0x14, 0x55, 0x3c, 0xa5, 0x52, 0x91, 0x29, 0x77, 0x4a, 0x1e, 0xea, 0xe4,
	0x53, 0xc1, 0xc3, 0x25, 0xa8, 0x05, 0x43, 0xa2, 0x88, 0xd3, 0xf2, 0x50, 0xa7, 0x1e, 0x98, 0xb1,
	0xdf, 0x83, 0x8a, 0x2e, 0x22, 0xa0, 0xe7, 0x12, 0x7f, 0x0a, 0x15, 0x23, 0x33, 0x61, 0x91, 0x83,
	0xbc, 0x7c, 0xa7, 0xb6, 0xa5, 0x54, 0xed, 0x47, 0xaf, 0x70, 0xf9, 0xdb, 0xbb, 0x56, 0x50, 0x16,
	0x29, 0xe4, 0xff, 0x9c, 0x03, 0x5b, 0x87, 0xbb, 0x9c, 0x4f, 0xe6, 0x83, 0x84, 0xf0, 0x80, 0x9e,
	0xe3, 0x67, 0x1b, 0x9e, 0x3d, 0xd9, 0x14, 0xca, 0x98, 0x6f, 0x88, 0x73, 0x4f, 0xa0, 0xaa, 0xf7,
	0x3f, 0x24, 0x61, 0x28, 0x9c, 0xb2, 0x49, 0x69, 0x9a, 0xb3, 0x1b, 0x86, 0x22, 0x0b, 0x72, 0xa2,
	0x4e, 0x9d, 0xca, 0x2a, 0xf8, 0x9a, 0xa8, 0xd3, 0xcc, 0xf3, 0xea, 0x9a, 0xe7, 0x3f, 0x22, 0x78,
	0xb4, 0xe1, 0xc2, 0x40, 0x11, 0x35, 0x93, 0xda, 0xb5, 0xff, 0xc3, 0x04, 0xff, 0x87, 0x7b, 0xf6,
	0x23, 0x39, 0xfe, 0x04, 0x4a, 0xd2, 0x4c, 0x16, 0xe7, 0xf8, 0xf4, 0x9e, 0x73, 0x5c, 0xac, 0x58,
	0x90, 0x71, 0x1b, 0x2a, 0x5c, 0xb0, 0x48, 0x50, 0x29, 0x4d, 0x09, 0x85, 0x20, 0x9b, 0xe3, 0xa7,
	0x00, 0x29, 0x6b, 0xed, 0xe2, 0x55, 0x53, 0x44, 0xdf, 0xbd, 0x63, 0x68, 0x0c, 0x74, 0x8a, 0x70,
	0xd1, 0x96, 0x77, 0x2c, 0x41, 0xff, 0xca, 0x92, 0xdc, 0x16, 0x4b, 0xfc, 0xa3, 0x0d, 0x6d, 0xc9,
	0x33, 0x8f, 0xd0, 0x36, 0x8f, 0x72, 0xeb, 0x8d, 0xf2, 0x0e, 0x54, 0x57, 0x3d, 0x92, 0x37, 0x3d,
	0xb2, 0x02, 0x76, 0x3f, 0xcf, 0xde, 0x0b, 0xf3, 0xe6, 0x60, 0x68, 0xbe, 0x4c, 0x94, 0x98, 0x1f,
	0x30, 0x31, 0x25, 0x93, 0x80, 0x5c, 0xd8, 0x16, 0x7e, 0x04, 0xd8, 0x60, 0xda, 0x2d, 0x79, 0xca,
	0x54, 0x40, 0x2e, 0xbe, 0xfa, 0xce, 0x46, 0xbb, 0xbf, 0x20, 0x78, 0x6b, 0x8b, 0x95, 0xd8, 0x86,
	0xba, 0x81, 0xbe, 0x4d, 0xce, 0x12, 0x76, 0x91, 0xd8, 0x16, 0x76, 0x60, 0xc7, 0x20, 0x47, 0x24,
	0x56, 0x71, 0x12, 0x1d, 0x0a, 0x92, 0xc8, 0x31, 0x15, 0x36, 0xca, 0x22, 0x4b, 0x68, 0x30, 0x1b,
	0x8d, 0xa8, 0x94, 0x76, 0x2e, 0x53, 0x59, 0xac, 0xb1, 0xf3, 0x19, 0xb2, 0xe4, 0x14, 0x70, 0x0b,
	0x6a, 0x06, 0xf9, 0x82, 0xc4, 0x13, 0x1a, 0xda, 0xc5, 0x8c, 0xf2, 0x2a, 0x96, 0x52, 0x2f, 0x2a,
	0xe9, 0x82, 0x0c, 0xf2, 0xcd, 0x4c, 0xb1, 0x71, 0x48, 0x14, 0xb5, 0xcb, 0xf8, 0x21, 0x3c, 0x58,
	0x97, 0xee, 0xd1, 0x28, 0x4e, 0xec, 0xca, 0xee, 0xc7, 0xf0, 0xe0, 0xce, 0x0d, 0xc7, 0x4d, 0x80,
	0xd4, 0x0b, 0x8d, 0xd8, 0x96, 0x4e, 0x39, 0x38, 0x8b, 0x39, 0xa7, 0xa1, 0x01, 0xd0, 0xf3, 0x3f,
	0x73, 0xd0, 0xea, 0x0b, 0x26, 0x65, 0x3f, 0x3d, 0xd6, 0xee, 0xeb, 0x2f, 0xf1, 0x67, 0xd0, 0x30,
	0x2a, 0xd9, 0xfb, 0x84, 0x37, 0x9b, 0x4f, 0x63, 0x6d, 0x7b, 0x0d, 0x33, 0x7f, 0x81, 0x6f, 0xe1,
	0x3e, 0x34, 0xf6, 0xa9, 0x5a, 0x9d, 0x34, 0x7e, 0xbc, 0x22, 0x6d, 0xf4, 0x56, 0x7b, 0x7b, 0x40,
	0x72, 0xdf, 0xc2, 0x2f, 0x00, 0x1f, 0x30, 0x15, 0x8f, 0x57, 0xa6, 0x26, 0x84, 0xe3, 0xf6, 0x3d,
	0xfd, 0xaf, 0xc5, 0xb6, 0x6d, 0xa5, 0x0b, 0xad, 0x54, 0x25, 0x63, 0xfe, 0x67, 0x89, 0x63, 0xc0,
	0xfb, 0xf4, 0x4e, 0x7b, 0x78, 0x7f, 0x7f, 0x11, 0xe9, 0x79, 0xfb, 0x1f, 0x18, 0xba, 0xc8, 0x9e,
	0x77, 0x79, 0xed, 0x5a, 0x57, 0xd7, 0xae, 0x75, 0x79, 0xe3, 0xa2, 0xab, 0x1b, 0x17, 0xfd, 0x7e,
	0xe3, 0xa2, 0x9f, 0x6e, 0x5d, 0xeb, 0xea, 0xd6, 0xb5, 0x7e, 0xbd, 0x75, 0xad, 0x93, 0x92, 0xf9,
	0x6a, 0x3f, 0xfa, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x13, 0xd9, 0x12, 0x33, 0x9a, 0x07, 0x00, 0x00,
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// 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.SupportPackageIsVersion4

// CrossClusterAPIClient is the client API for CrossClusterAPI service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
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)
}

type crossClusterAPIClient struct {
	cc *grpc.ClientConn
}

func NewCrossClusterAPIClient(cc *grpc.ClientConn) CrossClusterAPIClient {
	return &crossClusterAPIClient{cc}
}

func (c *crossClusterAPIClient) ApplyRaftReqs(ctx context.Context, in *RaftReqs, opts ...grpc.CallOption) (*RpcErr, error) {
	out := new(RpcErr)
	err := c.cc.Invoke(ctx, "/syncerpb.CrossClusterAPI/ApplyRaftReqs", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *crossClusterAPIClient) GetSyncedRaft(ctx context.Context, in *SyncedRaftReq, opts ...grpc.CallOption) (*SyncedRaftRsp, error) {
	out := new(SyncedRaftRsp)
	err := c.cc.Invoke(ctx, "/syncerpb.CrossClusterAPI/GetSyncedRaft", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *crossClusterAPIClient) NotifyTransferSnap(ctx context.Context, in *RaftApplySnapReq, opts ...grpc.CallOption) (*RpcErr, error) {
	out := new(RpcErr)
	err := c.cc.Invoke(ctx, "/syncerpb.CrossClusterAPI/NotifyTransferSnap", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *crossClusterAPIClient) NotifyApplySnap(ctx context.Context, in *RaftApplySnapReq, opts ...grpc.CallOption) (*RpcErr, error) {
	out := new(RpcErr)
	err := c.cc.Invoke(ctx, "/syncerpb.CrossClusterAPI/NotifyApplySnap", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *crossClusterAPIClient) GetApplySnapStatus(ctx context.Context, in *RaftApplySnapStatusReq, opts ...grpc.CallOption) (*RaftApplySnapStatusRsp, error) {
	out := new(RaftApplySnapStatusRsp)
	err := c.cc.Invoke(ctx, "/syncerpb.CrossClusterAPI/GetApplySnapStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CrossClusterAPIServer is the server API for CrossClusterAPI service.
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)
}

func RegisterCrossClusterAPIServer(s *grpc.Server, srv CrossClusterAPIServer) {
	s.RegisterService(&_CrossClusterAPI_serviceDesc, srv)
}

func _CrossClusterAPI_ApplyRaftReqs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RaftReqs)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrossClusterAPIServer).ApplyRaftReqs(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/syncerpb.CrossClusterAPI/ApplyRaftReqs",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrossClusterAPIServer).ApplyRaftReqs(ctx, req.(*RaftReqs))
	}
	return interceptor(ctx, in, info, handler)
}

func _CrossClusterAPI_GetSyncedRaft_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SyncedRaftReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrossClusterAPIServer).GetSyncedRaft(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/syncerpb.CrossClusterAPI/GetSyncedRaft",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrossClusterAPIServer).GetSyncedRaft(ctx, req.(*SyncedRaftReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _CrossClusterAPI_NotifyTransferSnap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RaftApplySnapReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrossClusterAPIServer).NotifyTransferSnap(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/syncerpb.CrossClusterAPI/NotifyTransferSnap",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrossClusterAPIServer).NotifyTransferSnap(ctx, req.(*RaftApplySnapReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _CrossClusterAPI_NotifyApplySnap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RaftApplySnapReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrossClusterAPIServer).NotifyApplySnap(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/syncerpb.CrossClusterAPI/NotifyApplySnap",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrossClusterAPIServer).NotifyApplySnap(ctx, req.(*RaftApplySnapReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _CrossClusterAPI_GetApplySnapStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RaftApplySnapStatusReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CrossClusterAPIServer).GetApplySnapStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/syncerpb.CrossClusterAPI/GetApplySnapStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CrossClusterAPIServer).GetApplySnapStatus(ctx, req.(*RaftApplySnapStatusReq))
	}
	return interceptor(ctx, in, info, handler)
}

var _CrossClusterAPI_serviceDesc = grpc.ServiceDesc{
	ServiceName: "syncerpb.CrossClusterAPI",
	HandlerType: (*CrossClusterAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ApplyRaftReqs",
			Handler:    _CrossClusterAPI_ApplyRaftReqs_Handler,
		},
		{
			MethodName: "GetSyncedRaft",
			Handler:    _CrossClusterAPI_GetSyncedRaft_Handler,
		},
		{
			MethodName: "NotifyTransferSnap",
			Handler:    _CrossClusterAPI_NotifyTransferSnap_Handler,
		},
		{
			MethodName: "NotifyApplySnap",
			Handler:    _CrossClusterAPI_NotifyApplySnap_Handler,
		},
		{
			MethodName: "GetApplySnapStatus",
			Handler:    _CrossClusterAPI_GetApplySnapStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "syncer.proto",
}

func (m *RpcErr) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RpcErr) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.ErrType != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.ErrType))
	}
	if m.ErrCode != 0 {
		dAtA[i] = 0x10
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.ErrCode))
	}
	if len(m.ErrMsg) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.ErrMsg)))
		i += copy(dAtA[i:], m.ErrMsg)
	}
	return i, nil
}

func (m *RaftLogData) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RaftLogData) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Type != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Type))
	}
	if len(m.ClusterName) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.ClusterName)))
		i += copy(dAtA[i:], m.ClusterName)
	}
	if len(m.RaftGroupName) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.RaftGroupName)))
		i += copy(dAtA[i:], m.RaftGroupName)
	}
	if m.Term != 0 {
		dAtA[i] = 0x20
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Term))
	}
	if m.Index != 0 {
		dAtA[i] = 0x28
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Index))
	}
	if m.RaftTimestamp != 0 {
		dAtA[i] = 0x30
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.RaftTimestamp))
	}
	if len(m.Data) > 0 {
		dAtA[i] = 0x7a
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.Data)))
		i += copy(dAtA[i:], m.Data)
	}
	return i, nil
}

func (m *RaftReqs) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RaftReqs) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.RaftLog) > 0 {
		for _, msg := range m.RaftLog {
			dAtA[i] = 0xa
			i++
			i = encodeVarintSyncer(dAtA, i, uint64(msg.Size()))
			n, err := msg.MarshalTo(dAtA[i:])
			if err != nil {
				return 0, err
			}
			i += n
		}
	}
	return i, nil
}

func (m *RaftApplySnapReq) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RaftApplySnapReq) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Type != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Type))
	}
	if len(m.ClusterName) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.ClusterName)))
		i += copy(dAtA[i:], m.ClusterName)
	}
	if len(m.RaftGroupName) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.RaftGroupName)))
		i += copy(dAtA[i:], m.RaftGroupName)
	}
	if m.Term != 0 {
		dAtA[i] = 0x20
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Term))
	}
	if m.Index != 0 {
		dAtA[i] = 0x28
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Index))
	}
	if m.RaftTimestamp != 0 {
		dAtA[i] = 0x30
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.RaftTimestamp))
	}
	if len(m.SyncAddr) > 0 {
		dAtA[i] = 0x3a
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.SyncAddr)))
		i += copy(dAtA[i:], m.SyncAddr)
	}
	if len(m.SyncPath) > 0 {
		dAtA[i] = 0x42
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.SyncPath)))
		i += copy(dAtA[i:], m.SyncPath)
	}
	if len(m.Data) > 0 {
		dAtA[i] = 0x4a
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.Data)))
		i += copy(dAtA[i:], m.Data)
	}
	return i, nil
}

func (m *RaftApplySnapStatusReq) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RaftApplySnapStatusReq) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.ClusterName) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.ClusterName)))
		i += copy(dAtA[i:], m.ClusterName)
	}
	if len(m.RaftGroupName) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.RaftGroupName)))
		i += copy(dAtA[i:], m.RaftGroupName)
	}
	if m.Term != 0 {
		dAtA[i] = 0x20
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Term))
	}
	if m.Index != 0 {
		dAtA[i] = 0x28
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Index))
	}
	return i, nil
}

func (m *RaftApplySnapStatusRsp) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *RaftApplySnapStatusRsp) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Status != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Status))
	}
	if m.Progress != 0 {
		dAtA[i] = 0x10
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Progress))
	}
	if len(m.StatusMsg) > 0 {
		dAtA[i] = 0x1a
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.StatusMsg)))
		i += copy(dAtA[i:], m.StatusMsg)
	}
	return i, nil
}

func (m *SyncedRaftReq) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *SyncedRaftReq) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if len(m.ClusterName) > 0 {
		dAtA[i] = 0xa
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.ClusterName)))
		i += copy(dAtA[i:], m.ClusterName)
	}
	if len(m.RaftGroupName) > 0 {
		dAtA[i] = 0x12
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(len(m.RaftGroupName)))
		i += copy(dAtA[i:], m.RaftGroupName)
	}
	return i, nil
}

func (m *SyncedRaftRsp) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalTo(dAtA)
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *SyncedRaftRsp) MarshalTo(dAtA []byte) (int, error) {
	var i int
	_ = i
	var l int
	_ = l
	if m.Term != 0 {
		dAtA[i] = 0x8
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Term))
	}
	if m.Index != 0 {
		dAtA[i] = 0x10
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Index))
	}
	if m.Timestamp != 0 {
		dAtA[i] = 0x18
		i++
		i = encodeVarintSyncer(dAtA, i, uint64(m.Timestamp))
	}
	return i, nil
}

func encodeVarintSyncer(dAtA []byte, offset int, v uint64) int {
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return offset + 1
}
func (m *RpcErr) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.ErrType != 0 {
		n += 1 + sovSyncer(uint64(m.ErrType))
	}
	if m.ErrCode != 0 {
		n += 1 + sovSyncer(uint64(m.ErrCode))
	}
	l = len(m.ErrMsg)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	return n
}

func (m *RaftLogData) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Type != 0 {
		n += 1 + sovSyncer(uint64(m.Type))
	}
	l = len(m.ClusterName)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	l = len(m.RaftGroupName)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	if m.Term != 0 {
		n += 1 + sovSyncer(uint64(m.Term))
	}
	if m.Index != 0 {
		n += 1 + sovSyncer(uint64(m.Index))
	}
	if m.RaftTimestamp != 0 {
		n += 1 + sovSyncer(uint64(m.RaftTimestamp))
	}
	l = len(m.Data)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	return n
}

func (m *RaftReqs) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.RaftLog) > 0 {
		for _, e := range m.RaftLog {
			l = e.Size()
			n += 1 + l + sovSyncer(uint64(l))
		}
	}
	return n
}

func (m *RaftApplySnapReq) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Type != 0 {
		n += 1 + sovSyncer(uint64(m.Type))
	}
	l = len(m.ClusterName)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	l = len(m.RaftGroupName)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	if m.Term != 0 {
		n += 1 + sovSyncer(uint64(m.Term))
	}
	if m.Index != 0 {
		n += 1 + sovSyncer(uint64(m.Index))
	}
	if m.RaftTimestamp != 0 {
		n += 1 + sovSyncer(uint64(m.RaftTimestamp))
	}
	l = len(m.SyncAddr)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	l = len(m.SyncPath)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	l = len(m.Data)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	return n
}

func (m *RaftApplySnapStatusReq) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClusterName)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	l = len(m.RaftGroupName)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	if m.Term != 0 {
		n += 1 + sovSyncer(uint64(m.Term))
	}
	if m.Index != 0 {
		n += 1 + sovSyncer(uint64(m.Index))
	}
	return n
}

func (m *RaftApplySnapStatusRsp) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Status != 0 {
		n += 1 + sovSyncer(uint64(m.Status))
	}
	if m.Progress != 0 {
		n += 1 + sovSyncer(uint64(m.Progress))
	}
	l = len(m.StatusMsg)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	return n
}

func (m *SyncedRaftReq) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClusterName)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	l = len(m.RaftGroupName)
	if l > 0 {
		n += 1 + l + sovSyncer(uint64(l))
	}
	return n
}

func (m *SyncedRaftRsp) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Term != 0 {
		n += 1 + sovSyncer(uint64(m.Term))
	}
	if m.Index != 0 {
		n += 1 + sovSyncer(uint64(m.Index))
	}
	if m.Timestamp != 0 {
		n += 1 + sovSyncer(uint64(m.Timestamp))
	}
	return n
}

func sovSyncer(x uint64) (n int) {
	for {
		n++
		x >>= 7
		if x == 0 {
			break
		}
	}
	return n
}
func sozSyncer(x uint64) (n int) {
	return sovSyncer(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *RpcErr) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RpcErr: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RpcErr: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ErrType", wireType)
			}
			m.ErrType = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.ErrType |= int32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field ErrCode", wireType)
			}
			m.ErrCode = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.ErrCode |= int32(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ErrMsg", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ErrMsg = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSyncer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RaftLogData) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RaftLogData: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RaftLogData: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
			}
			m.Type = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Type |= RaftLogType(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClusterName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RaftGroupName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RaftGroupName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
			}
			m.Term = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Term |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
			}
			m.Index = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Index |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RaftTimestamp", wireType)
			}
			m.RaftTimestamp = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RaftTimestamp |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 15:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
			if m.Data == nil {
				m.Data = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSyncer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RaftReqs) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RaftReqs: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RaftReqs: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RaftLog", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RaftLog = append(m.RaftLog, RaftLogData{})
			if err := m.RaftLog[len(m.RaftLog)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSyncer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RaftApplySnapReq) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RaftApplySnapReq: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RaftApplySnapReq: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
			}
			m.Type = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Type |= RaftApplySnapType(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClusterName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RaftGroupName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RaftGroupName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
			}
			m.Term = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Term |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
			}
			m.Index = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Index |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RaftTimestamp", wireType)
			}
			m.RaftTimestamp = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RaftTimestamp |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 7:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SyncAddr", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SyncAddr = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field SyncPath", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.SyncPath = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 9:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
			if m.Data == nil {
				m.Data = []byte{}
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSyncer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RaftApplySnapStatusReq) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RaftApplySnapStatusReq: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RaftApplySnapStatusReq: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClusterName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RaftGroupName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RaftGroupName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
			}
			m.Term = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Term |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 5:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
			}
			m.Index = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Index |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipSyncer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *RaftApplySnapStatusRsp) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: RaftApplySnapStatusRsp: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: RaftApplySnapStatusRsp: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
			}
			m.Status = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Status |= RaftApplySnapStatus(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Progress", wireType)
			}
			m.Progress = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Progress |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field StatusMsg", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.StatusMsg = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSyncer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SyncedRaftReq) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: SyncedRaftReq: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SyncedRaftReq: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClusterName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClusterName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field RaftGroupName", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthSyncer
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthSyncer
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.RaftGroupName = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipSyncer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *SyncedRaftRsp) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: SyncedRaftRsp: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: SyncedRaftRsp: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
			}
			m.Term = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Term |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
			}
			m.Index = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Index |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType)
			}
			m.Timestamp = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.Timestamp |= int64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		default:
			iNdEx = preIndex
			skippy, err := skipSyncer(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if skippy < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) < 0 {
				return ErrInvalidLengthSyncer
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipSyncer(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowSyncer
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
			return iNdEx, nil
		case 1:
			iNdEx += 8
			return iNdEx, nil
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowSyncer
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthSyncer
			}
			iNdEx += length
			if iNdEx < 0 {
				return 0, ErrInvalidLengthSyncer
			}
			return iNdEx, nil
		case 3:
			for {
				var innerWire uint64
				var start int = iNdEx
				for shift := uint(0); ; shift += 7 {
					if shift >= 64 {
						return 0, ErrIntOverflowSyncer
					}
					if iNdEx >= l {
						return 0, io.ErrUnexpectedEOF
					}
					b := dAtA[iNdEx]
					iNdEx++
					innerWire |= (uint64(b) & 0x7F) << shift
					if b < 0x80 {
						break
					}
				}
				innerWireType := int(innerWire & 0x7)
				if innerWireType == 4 {
					break
				}
				next, err := skipSyncer(dAtA[start:])
				if err != nil {
					return 0, err
				}
				iNdEx = start + next
				if iNdEx < 0 {
					return 0, ErrInvalidLengthSyncer
				}
			}
			return iNdEx, nil
		case 4:
			return iNdEx, nil
		case 5:
			iNdEx += 4
			return iNdEx, nil
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
	}
	panic("unreachable")
}

var (
	ErrInvalidLengthSyncer = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSyncer   = fmt.Errorf("proto: integer overflow")
)
