backup

package
v0.0.0-...-bbbbfd2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBackup = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBackup   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterBackupServer

func RegisterBackupServer(s *grpc.Server, srv BackupServer)

Types

type BackupClient

type BackupClient interface {
	Backup(ctx context.Context, in *BackupRequest, opts ...grpc.CallOption) (Backup_BackupClient, error)
}

func NewBackupClient

func NewBackupClient(cc *grpc.ClientConn) BackupClient

type BackupMeta

type BackupMeta struct {
	// ID and version of backuped cluster.
	ClusterId      uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	ClusterVersion string `protobuf:"bytes,2,opt,name=cluster_version,json=clusterVersion,proto3" json:"cluster_version,omitempty"`
	// The path where backup data are saved.
	Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	// A set of files that compose a backup.
	Files []*File `protobuf:"bytes,4,rep,name=files" json:"files,omitempty"`
	// A pair of timestamp specifies a time range of a backup.
	// For full backup, the start_version equals to the end_version,
	// it means point in time.
	// For incremental backup, the time range is specified as
	// (start_version, end_version].
	StartVersion uint64 `protobuf:"varint,5,opt,name=start_version,json=startVersion,proto3" json:"start_version,omitempty"`
	EndVersion   uint64 `protobuf:"varint,6,opt,name=end_version,json=endVersion,proto3" json:"end_version,omitempty"`
	// Additional metadata describes database and table info.
	Schemas              []*Schema `protobuf:"bytes,7,rep,name=schemas" json:"schemas,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

The message save the metadata of a backup.

func (*BackupMeta) Descriptor

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

func (*BackupMeta) GetClusterId

func (m *BackupMeta) GetClusterId() uint64

func (*BackupMeta) GetClusterVersion

func (m *BackupMeta) GetClusterVersion() string

func (*BackupMeta) GetEndVersion

func (m *BackupMeta) GetEndVersion() uint64

func (*BackupMeta) GetFiles

func (m *BackupMeta) GetFiles() []*File

func (*BackupMeta) GetPath

func (m *BackupMeta) GetPath() string

func (*BackupMeta) GetSchemas

func (m *BackupMeta) GetSchemas() []*Schema

func (*BackupMeta) GetStartVersion

func (m *BackupMeta) GetStartVersion() uint64

func (*BackupMeta) Marshal

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

func (*BackupMeta) MarshalTo

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

func (*BackupMeta) ProtoMessage

func (*BackupMeta) ProtoMessage()

func (*BackupMeta) Reset

func (m *BackupMeta) Reset()

func (*BackupMeta) Size

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

func (*BackupMeta) String

func (m *BackupMeta) String() string

func (*BackupMeta) Unmarshal

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

func (*BackupMeta) XXX_DiscardUnknown

func (m *BackupMeta) XXX_DiscardUnknown()

func (*BackupMeta) XXX_Marshal

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

func (*BackupMeta) XXX_Merge

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

func (*BackupMeta) XXX_Size

func (m *BackupMeta) XXX_Size() int

func (*BackupMeta) XXX_Unmarshal

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

type BackupRequest

type BackupRequest struct {
	ClusterId    uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	StartKey     []byte `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`
	EndKey       []byte `protobuf:"bytes,3,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"`
	StartVersion uint64 `protobuf:"varint,4,opt,name=start_version,json=startVersion,proto3" json:"start_version,omitempty"`
	EndVersion   uint64 `protobuf:"varint,5,opt,name=end_version,json=endVersion,proto3" json:"end_version,omitempty"`
	// The path where saves backup files.
	Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"`
	// The I/O rate limit for backup request.
	RateLimit uint64 `protobuf:"varint,7,opt,name=rate_limit,json=rateLimit,proto3" json:"rate_limit,omitempty"`
	// The concurrency for executing the backup request in every tikv node.
	Concurrency          uint32   `protobuf:"varint,8,opt,name=concurrency,proto3" json:"concurrency,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BackupRequest) Descriptor

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

func (*BackupRequest) GetClusterId

func (m *BackupRequest) GetClusterId() uint64

func (*BackupRequest) GetConcurrency

func (m *BackupRequest) GetConcurrency() uint32

func (*BackupRequest) GetEndKey

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

func (*BackupRequest) GetEndVersion

func (m *BackupRequest) GetEndVersion() uint64

func (*BackupRequest) GetPath

func (m *BackupRequest) GetPath() string

func (*BackupRequest) GetRateLimit

func (m *BackupRequest) GetRateLimit() uint64

func (*BackupRequest) GetStartKey

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

func (*BackupRequest) GetStartVersion

func (m *BackupRequest) GetStartVersion() uint64

func (*BackupRequest) Marshal

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

func (*BackupRequest) MarshalTo

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

func (*BackupRequest) ProtoMessage

func (*BackupRequest) ProtoMessage()

func (*BackupRequest) Reset

func (m *BackupRequest) Reset()

func (*BackupRequest) Size

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

func (*BackupRequest) String

func (m *BackupRequest) String() string

func (*BackupRequest) Unmarshal

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

func (*BackupRequest) XXX_DiscardUnknown

func (m *BackupRequest) XXX_DiscardUnknown()

func (*BackupRequest) XXX_Marshal

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

func (*BackupRequest) XXX_Merge

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

func (*BackupRequest) XXX_Size

func (m *BackupRequest) XXX_Size() int

func (*BackupRequest) XXX_Unmarshal

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

type BackupResponse

type BackupResponse struct {
	Error                *Error   `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
	StartKey             []byte   `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`
	EndKey               []byte   `protobuf:"bytes,3,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"`
	Files                []*File  `protobuf:"bytes,4,rep,name=files" json:"files,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BackupResponse) Descriptor

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

func (*BackupResponse) GetEndKey

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

func (*BackupResponse) GetError

func (m *BackupResponse) GetError() *Error

func (*BackupResponse) GetFiles

func (m *BackupResponse) GetFiles() []*File

func (*BackupResponse) GetStartKey

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

func (*BackupResponse) Marshal

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

func (*BackupResponse) MarshalTo

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

func (*BackupResponse) ProtoMessage

func (*BackupResponse) ProtoMessage()

func (*BackupResponse) Reset

func (m *BackupResponse) Reset()

func (*BackupResponse) Size

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

func (*BackupResponse) String

func (m *BackupResponse) String() string

func (*BackupResponse) Unmarshal

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

func (*BackupResponse) XXX_DiscardUnknown

func (m *BackupResponse) XXX_DiscardUnknown()

func (*BackupResponse) XXX_Marshal

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

func (*BackupResponse) XXX_Merge

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

func (*BackupResponse) XXX_Size

func (m *BackupResponse) XXX_Size() int

func (*BackupResponse) XXX_Unmarshal

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

type BackupServer

type BackupServer interface {
	Backup(*BackupRequest, Backup_BackupServer) error
}

type Backup_BackupClient

type Backup_BackupClient interface {
	Recv() (*BackupResponse, error)
	grpc.ClientStream
}

type Backup_BackupServer

type Backup_BackupServer interface {
	Send(*BackupResponse) error
	grpc.ServerStream
}

type ClusterIDError

type ClusterIDError struct {
	Current              uint64   `protobuf:"varint,1,opt,name=current,proto3" json:"current,omitempty"`
	Request              uint64   `protobuf:"varint,2,opt,name=request,proto3" json:"request,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ClusterIDError) Descriptor

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

func (*ClusterIDError) GetCurrent

func (m *ClusterIDError) GetCurrent() uint64

func (*ClusterIDError) GetRequest

func (m *ClusterIDError) GetRequest() uint64

func (*ClusterIDError) Marshal

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

func (*ClusterIDError) MarshalTo

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

func (*ClusterIDError) ProtoMessage

func (*ClusterIDError) ProtoMessage()

func (*ClusterIDError) Reset

func (m *ClusterIDError) Reset()

func (*ClusterIDError) Size

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

func (*ClusterIDError) String

func (m *ClusterIDError) String() string

func (*ClusterIDError) Unmarshal

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

func (*ClusterIDError) XXX_DiscardUnknown

func (m *ClusterIDError) XXX_DiscardUnknown()

func (*ClusterIDError) XXX_Marshal

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

func (*ClusterIDError) XXX_Merge

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

func (*ClusterIDError) XXX_Size

func (m *ClusterIDError) XXX_Size() int

func (*ClusterIDError) XXX_Unmarshal

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

type Error

type Error struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// Types that are valid to be assigned to Detail:
	//	*Error_ClusterIdError
	//	*Error_KvError
	//	*Error_RegionError
	Detail               isError_Detail `protobuf_oneof:"detail"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*Error) Descriptor

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

func (*Error) GetClusterIdError

func (m *Error) GetClusterIdError() *ClusterIDError

func (*Error) GetDetail

func (m *Error) GetDetail() isError_Detail

func (*Error) GetKvError

func (m *Error) GetKvError() *kvrpcpb.KeyError

func (*Error) GetMsg

func (m *Error) GetMsg() string

func (*Error) GetRegionError

func (m *Error) GetRegionError() *errorpb.Error

func (*Error) Marshal

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

func (*Error) MarshalTo

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

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) Size

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

func (*Error) String

func (m *Error) String() string

func (*Error) Unmarshal

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

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

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

func (*Error) XXX_Merge

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

func (*Error) XXX_OneofFuncs

func (*Error) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

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

type Error_ClusterIdError

type Error_ClusterIdError struct {
	ClusterIdError *ClusterIDError `protobuf:"bytes,3,opt,name=cluster_id_error,json=clusterIdError,oneof"`
}

func (*Error_ClusterIdError) MarshalTo

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

func (*Error_ClusterIdError) Size

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

type Error_KvError

type Error_KvError struct {
	KvError *kvrpcpb.KeyError `protobuf:"bytes,4,opt,name=kv_error,json=kvError,oneof"`
}

func (*Error_KvError) MarshalTo

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

func (*Error_KvError) Size

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

type Error_RegionError

type Error_RegionError struct {
	RegionError *errorpb.Error `protobuf:"bytes,5,opt,name=region_error,json=regionError,oneof"`
}

func (*Error_RegionError) MarshalTo

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

func (*Error_RegionError) Size

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

type File

type File struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Sha256               []byte   `protobuf:"bytes,2,opt,name=sha256,proto3" json:"sha256,omitempty"`
	StartKey             []byte   `protobuf:"bytes,3,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`
	EndKey               []byte   `protobuf:"bytes,4,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"`
	StartVersion         uint64   `protobuf:"varint,5,opt,name=start_version,json=startVersion,proto3" json:"start_version,omitempty"`
	EndVersion           uint64   `protobuf:"varint,6,opt,name=end_version,json=endVersion,proto3" json:"end_version,omitempty"`
	Crc64Xor             uint64   `protobuf:"varint,7,opt,name=crc64xor,proto3" json:"crc64xor,omitempty"`
	TotalKvs             uint64   `protobuf:"varint,8,opt,name=total_kvs,json=totalKvs,proto3" json:"total_kvs,omitempty"`
	TotalBytes           uint64   `protobuf:"varint,9,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*File) Descriptor

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

func (*File) GetCrc64Xor

func (m *File) GetCrc64Xor() uint64

func (*File) GetEndKey

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

func (*File) GetEndVersion

func (m *File) GetEndVersion() uint64

func (*File) GetName

func (m *File) GetName() string

func (*File) GetSha256

func (m *File) GetSha256() []byte

func (*File) GetStartKey

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

func (*File) GetStartVersion

func (m *File) GetStartVersion() uint64

func (*File) GetTotalBytes

func (m *File) GetTotalBytes() uint64

func (*File) GetTotalKvs

func (m *File) GetTotalKvs() uint64

func (*File) Marshal

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

func (*File) MarshalTo

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

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) Reset

func (m *File) Reset()

func (*File) Size

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

func (*File) String

func (m *File) String() string

func (*File) Unmarshal

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

func (*File) XXX_DiscardUnknown

func (m *File) XXX_DiscardUnknown()

func (*File) XXX_Marshal

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

func (*File) XXX_Merge

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

func (*File) XXX_Size

func (m *File) XXX_Size() int

func (*File) XXX_Unmarshal

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

type Schema

type Schema struct {
	Db                   []byte   `protobuf:"bytes,1,opt,name=db,proto3" json:"db,omitempty"`
	Table                []byte   `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"`
	Crc64Xor             uint64   `protobuf:"varint,3,opt,name=crc64xor,proto3" json:"crc64xor,omitempty"`
	TotalKvs             uint64   `protobuf:"varint,4,opt,name=total_kvs,json=totalKvs,proto3" json:"total_kvs,omitempty"`
	TotalBytes           uint64   `protobuf:"varint,5,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Schema) Descriptor

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

func (*Schema) GetCrc64Xor

func (m *Schema) GetCrc64Xor() uint64

func (*Schema) GetDb

func (m *Schema) GetDb() []byte

func (*Schema) GetTable

func (m *Schema) GetTable() []byte

func (*Schema) GetTotalBytes

func (m *Schema) GetTotalBytes() uint64

func (*Schema) GetTotalKvs

func (m *Schema) GetTotalKvs() uint64

func (*Schema) Marshal

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

func (*Schema) MarshalTo

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

func (*Schema) ProtoMessage

func (*Schema) ProtoMessage()

func (*Schema) Reset

func (m *Schema) Reset()

func (*Schema) Size

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

func (*Schema) String

func (m *Schema) String() string

func (*Schema) Unmarshal

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

func (*Schema) XXX_DiscardUnknown

func (m *Schema) XXX_DiscardUnknown()

func (*Schema) XXX_Marshal

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

func (*Schema) XXX_Merge

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

func (*Schema) XXX_Size

func (m *Schema) XXX_Size() int

func (*Schema) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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