polypb

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2017 License: Apache-2.0 Imports: 12 Imported by: 8

Documentation

Overview

Package polypb is a generated protocol buffer package.

It is generated from these files:

polypb/metadata.proto

It has these top-level messages:

DiskMeta
NodeMeta
BackupMeta
XtrabackupMeta
MysqldumpMeta
XtrabackupCheckpoints

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetadata   = fmt.Errorf("proto: integer overflow")
)
View Source
var BackupType_name = map[int32]string{
	0: "XTRABACKUP_FULL",
	1: "XTRABACKUP_INC",
	2: "MYSQLDUMP",
}
View Source
var BackupType_value = map[string]int32{
	"XTRABACKUP_FULL": 0,
	"XTRABACKUP_INC":  1,
	"MYSQLDUMP":       2,
}
View Source
var StorageType_name = map[int32]string{
	0: "LOCAL_DISK",
	1: "LOCAL_MEM",
}
View Source
var StorageType_value = map[string]int32{
	"LOCAL_DISK": 0,
	"LOCAL_MEM":  1,
}

Functions

This section is empty.

Types

type BackupMeta

type BackupMeta struct {
	StoredTime  *time.Time  `protobuf:"bytes,1,opt,name=stored_time,json=storedTime,stdtime" json:"stored_time,omitempty"`
	NodeId      NodeID      `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3,casttype=NodeID" json:"node_id,omitempty"`
	Host        string      `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"`
	StorageType StorageType `protobuf:"varint,4,opt,name=storage_type,json=storageType,proto3,enum=polypb.StorageType" json:"storage_type,omitempty"`
	EndTime     *time.Time  `protobuf:"bytes,5,opt,name=end_time,json=endTime,stdtime" json:"end_time,omitempty"`
	FileSize    int64       `protobuf:"varint,6,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty"`
	BackupType  BackupType  `protobuf:"varint,7,opt,name=backup_type,json=backupType,proto3,enum=polypb.BackupType" json:"backup_type,omitempty"`
	Db          DatabaseID  `protobuf:"bytes,8,opt,name=db,proto3,casttype=DatabaseID" json:"db,omitempty"`
	//  string to_lsn = 9;
	Key           Key       `protobuf:"bytes,10,opt,name=key,proto3,casttype=Key" json:"key,omitempty"`
	BaseTimePoint TimePoint `protobuf:"bytes,11,opt,name=base_time_point,json=baseTimePoint,proto3,casttype=TimePoint" json:"base_time_point,omitempty"`
	// Types that are valid to be assigned to Details:
	//	*BackupMeta_XtrabackupMeta
	//	*BackupMeta_MysqldumpMeta
	Details isBackupMeta_Details `protobuf_oneof:"details"`
}

BackupMeta is a metadata about a backup file.

func NewBackupMeta added in v0.6.0

func NewBackupMeta(
	db DatabaseID,
	host string,
	nodeID NodeID,
) *BackupMeta

func (*BackupMeta) Descriptor

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

func (*BackupMeta) Equal added in v0.6.0

func (this *BackupMeta) Equal(that interface{}) bool

func (*BackupMeta) GetBackupType

func (m *BackupMeta) GetBackupType() BackupType

func (*BackupMeta) GetBaseTimePoint

func (m *BackupMeta) GetBaseTimePoint() TimePoint

func (*BackupMeta) GetDb

func (m *BackupMeta) GetDb() DatabaseID

func (*BackupMeta) GetDetails added in v0.6.0

func (m *BackupMeta) GetDetails() isBackupMeta_Details

func (*BackupMeta) GetEndTime

func (m *BackupMeta) GetEndTime() *time.Time

func (*BackupMeta) GetFileSize

func (m *BackupMeta) GetFileSize() int64

func (*BackupMeta) GetHost

func (m *BackupMeta) GetHost() string

func (*BackupMeta) GetKey

func (m *BackupMeta) GetKey() Key

func (*BackupMeta) GetMysqldumpMeta added in v0.6.0

func (m *BackupMeta) GetMysqldumpMeta() *MysqldumpMeta

func (*BackupMeta) GetNodeId

func (m *BackupMeta) GetNodeId() NodeID

func (*BackupMeta) GetStorageType

func (m *BackupMeta) GetStorageType() StorageType

func (*BackupMeta) GetStoredTime

func (m *BackupMeta) GetStoredTime() *time.Time

func (*BackupMeta) GetXtrabackupMeta added in v0.6.0

func (m *BackupMeta) GetXtrabackupMeta() *XtrabackupMeta

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_OneofFuncs added in v0.6.0

func (*BackupMeta) 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.

type BackupMetaKey

type BackupMetaKey Key

type BackupMetaSlice

type BackupMetaSlice []*BackupMeta

func (BackupMetaSlice) Sort

func (s BackupMetaSlice) Sort()

type BackupMeta_MysqldumpMeta added in v0.6.0

type BackupMeta_MysqldumpMeta struct {
	MysqldumpMeta *MysqldumpMeta `protobuf:"bytes,13,opt,name=mysqldump_meta,json=mysqldumpMeta,oneof"`
}

func (*BackupMeta_MysqldumpMeta) Equal added in v0.6.0

func (this *BackupMeta_MysqldumpMeta) Equal(that interface{}) bool

func (*BackupMeta_MysqldumpMeta) MarshalTo added in v0.6.0

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

func (*BackupMeta_MysqldumpMeta) Size added in v0.6.0

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

type BackupMeta_XtrabackupMeta added in v0.6.0

type BackupMeta_XtrabackupMeta struct {
	XtrabackupMeta *XtrabackupMeta `protobuf:"bytes,12,opt,name=xtrabackup_meta,json=xtrabackupMeta,oneof"`
}

func (*BackupMeta_XtrabackupMeta) Equal added in v0.6.0

func (this *BackupMeta_XtrabackupMeta) Equal(that interface{}) bool

func (*BackupMeta_XtrabackupMeta) MarshalTo added in v0.6.0

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

func (*BackupMeta_XtrabackupMeta) Size added in v0.6.0

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

type BackupType

type BackupType int32

BackupType

const (
	BackupType_XTRABACKUP_FULL BackupType = 0
	BackupType_XTRABACKUP_INC  BackupType = 1
	BackupType_MYSQLDUMP       BackupType = 2
)

func (BackupType) EnumDescriptor

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

func (BackupType) String

func (x BackupType) String() string

type DatabaseID

type DatabaseID []byte

func (DatabaseID) MarshalJSON added in v0.6.0

func (d DatabaseID) MarshalJSON() ([]byte, error)

func (*DatabaseID) Set

func (d *DatabaseID) Set(v string) error

func (*DatabaseID) String

func (d *DatabaseID) String() string

func (*DatabaseID) Type

func (d *DatabaseID) Type() string

func (*DatabaseID) UnmarshalJSON added in v0.6.0

func (d *DatabaseID) UnmarshalJSON(data []byte) error

type DiskMeta

type DiskMeta struct {
	Total uint64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	Avail uint64 `protobuf:"varint,2,opt,name=avail,proto3" json:"avail,omitempty"`
}

DiskMeta is a metadata about a disk.

func (*DiskMeta) Descriptor

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

func (*DiskMeta) Equal added in v0.6.0

func (this *DiskMeta) Equal(that interface{}) bool

func (*DiskMeta) GetAvail

func (m *DiskMeta) GetAvail() uint64

func (*DiskMeta) GetTotal

func (m *DiskMeta) GetTotal() uint64

func (*DiskMeta) Marshal

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

func (*DiskMeta) MarshalTo

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

func (*DiskMeta) ProtoMessage

func (*DiskMeta) ProtoMessage()

func (*DiskMeta) Reset

func (m *DiskMeta) Reset()

func (*DiskMeta) Size

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

func (*DiskMeta) String

func (m *DiskMeta) String() string

func (*DiskMeta) Unmarshal

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

type Key

type Key []byte

type MysqldumpMeta added in v0.6.0

type MysqldumpMeta struct {
}

func (*MysqldumpMeta) Descriptor added in v0.6.0

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

func (*MysqldumpMeta) Equal added in v0.6.0

func (this *MysqldumpMeta) Equal(that interface{}) bool

func (*MysqldumpMeta) Marshal added in v0.6.0

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

func (*MysqldumpMeta) MarshalTo added in v0.6.0

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

func (*MysqldumpMeta) ProtoMessage added in v0.6.0

func (*MysqldumpMeta) ProtoMessage()

func (*MysqldumpMeta) Reset added in v0.6.0

func (m *MysqldumpMeta) Reset()

func (*MysqldumpMeta) Size added in v0.6.0

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

func (*MysqldumpMeta) String added in v0.6.0

func (m *MysqldumpMeta) String() string

func (*MysqldumpMeta) Unmarshal added in v0.6.0

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

type NodeID

type NodeID []byte

func (*NodeID) Set

func (d *NodeID) Set(v string) error

func (*NodeID) String

func (d *NodeID) String() string

func (*NodeID) Type

func (d *NodeID) Type() string

type NodeMeta

type NodeMeta struct {
	Disk     *DiskMeta `protobuf:"bytes,1,opt,name=disk" json:"disk,omitempty"`
	Addr     string    `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	StoreDir string    `protobuf:"bytes,3,opt,name=store_dir,json=storeDir,proto3" json:"store_dir,omitempty"`
	NodeId   NodeID    `protobuf:"bytes,4,opt,name=node_id,json=nodeId,proto3,casttype=NodeID" json:"node_id,omitempty"`
}

NodeMeta is a metadata about a node.

func (*NodeMeta) Descriptor

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

func (*NodeMeta) Equal added in v0.6.0

func (this *NodeMeta) Equal(that interface{}) bool

func (*NodeMeta) GetAddr

func (m *NodeMeta) GetAddr() string

func (*NodeMeta) GetDisk

func (m *NodeMeta) GetDisk() *DiskMeta

func (*NodeMeta) GetNodeId

func (m *NodeMeta) GetNodeId() NodeID

func (*NodeMeta) GetStoreDir

func (m *NodeMeta) GetStoreDir() string

func (*NodeMeta) Marshal

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

func (*NodeMeta) MarshalTo

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

func (*NodeMeta) ProtoMessage

func (*NodeMeta) ProtoMessage()

func (*NodeMeta) Reset

func (m *NodeMeta) Reset()

func (*NodeMeta) Size

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

func (*NodeMeta) String

func (m *NodeMeta) String() string

func (*NodeMeta) Unmarshal

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

type NodeMetaKey

type NodeMetaKey Key

type StorageType

type StorageType int32

StorageType

const (
	StorageType_LOCAL_DISK StorageType = 0
	StorageType_LOCAL_MEM  StorageType = 1
)

func (StorageType) EnumDescriptor

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

func (StorageType) String

func (x StorageType) String() string

type TimePoint

type TimePoint []byte

func NewTimePoint

func NewTimePoint(t time.Time) TimePoint

func (TimePoint) Add added in v0.6.0

func (t TimePoint) Add(d time.Duration) TimePoint

func (TimePoint) AsTime

func (t TimePoint) AsTime() time.Time

func (TimePoint) Equal

func (t TimePoint) Equal(ot TimePoint) bool

type XtrabackupCheckpoints added in v0.6.0

type XtrabackupCheckpoints struct {
	BackupType        string `protobuf:"bytes,1,opt,name=backup_type,json=backupType,proto3" json:"backup_type,omitempty" ini:"backup_type"`
	FromLsn           string `protobuf:"bytes,2,opt,name=from_lsn,json=fromLsn,proto3" json:"from_lsn,omitempty" ini:"from_lsn"`
	ToLsn             string `protobuf:"bytes,3,opt,name=to_lsn,json=toLsn,proto3" json:"to_lsn,omitempty" ini:"to_lsn"`
	LastLsn           string `protobuf:"bytes,4,opt,name=last_lsn,json=lastLsn,proto3" json:"last_lsn,omitempty" ini:"last_lsn"`
	Compact           int32  `protobuf:"varint,5,opt,name=compact,proto3" json:"compact,omitempty" ini:"compact"`
	RecoverBinlogInfo int32  `` /* 141-byte string literal not displayed */
}

func LoadXtrabackupCP added in v0.6.0

func LoadXtrabackupCP(source interface{}) (*XtrabackupCheckpoints, error)

func (*XtrabackupCheckpoints) Descriptor added in v0.6.0

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

func (*XtrabackupCheckpoints) Equal added in v0.6.0

func (this *XtrabackupCheckpoints) Equal(that interface{}) bool

func (*XtrabackupCheckpoints) GetBackupType added in v0.6.0

func (m *XtrabackupCheckpoints) GetBackupType() string

func (*XtrabackupCheckpoints) GetCompact added in v0.6.0

func (m *XtrabackupCheckpoints) GetCompact() int32

func (*XtrabackupCheckpoints) GetFromLsn added in v0.6.0

func (m *XtrabackupCheckpoints) GetFromLsn() string

func (*XtrabackupCheckpoints) GetLastLsn added in v0.6.0

func (m *XtrabackupCheckpoints) GetLastLsn() string

func (*XtrabackupCheckpoints) GetRecoverBinlogInfo added in v0.6.0

func (m *XtrabackupCheckpoints) GetRecoverBinlogInfo() int32

func (*XtrabackupCheckpoints) GetToLsn added in v0.6.0

func (m *XtrabackupCheckpoints) GetToLsn() string

func (*XtrabackupCheckpoints) Marshal added in v0.6.0

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

func (*XtrabackupCheckpoints) MarshalTo added in v0.6.0

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

func (*XtrabackupCheckpoints) ProtoMessage added in v0.6.0

func (*XtrabackupCheckpoints) ProtoMessage()

func (*XtrabackupCheckpoints) Reset added in v0.6.0

func (m *XtrabackupCheckpoints) Reset()

func (*XtrabackupCheckpoints) Size added in v0.6.0

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

func (*XtrabackupCheckpoints) String added in v0.6.0

func (m *XtrabackupCheckpoints) String() string

func (*XtrabackupCheckpoints) Unmarshal added in v0.6.0

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

type XtrabackupMeta added in v0.6.0

type XtrabackupMeta struct {
	Checkpoints *XtrabackupCheckpoints `protobuf:"bytes,1,opt,name=checkpoints" json:"checkpoints,omitempty"`
}

func (*XtrabackupMeta) Descriptor added in v0.6.0

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

func (*XtrabackupMeta) Equal added in v0.6.0

func (this *XtrabackupMeta) Equal(that interface{}) bool

func (*XtrabackupMeta) GetCheckpoints added in v0.6.0

func (m *XtrabackupMeta) GetCheckpoints() *XtrabackupCheckpoints

func (*XtrabackupMeta) Marshal added in v0.6.0

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

func (*XtrabackupMeta) MarshalTo added in v0.6.0

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

func (*XtrabackupMeta) ProtoMessage added in v0.6.0

func (*XtrabackupMeta) ProtoMessage()

func (*XtrabackupMeta) Reset added in v0.6.0

func (m *XtrabackupMeta) Reset()

func (*XtrabackupMeta) Size added in v0.6.0

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

func (*XtrabackupMeta) String added in v0.6.0

func (m *XtrabackupMeta) String() string

func (*XtrabackupMeta) Unmarshal added in v0.6.0

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

Jump to

Keyboard shortcuts

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