Documentation ¶
Index ¶
- Constants
- Variables
- func ChkErr(err error)
- func Clear(c *cli.Context) error
- func Create(c *cli.Context) error
- func Inspect(c *cli.Context) error
- func IsEmpty(name string) (bool, error)
- func ReadIncrementalMetadata(fw *FrameWriter, olddir string)
- func Restore(c *cli.Context) error
- type BackupMetadata
- type CephObject
- type Container
- type EtcdRecords
- type Frame
- type FrameWriter
- type KeyValue
- type MK
- type ProcessArgs
- type Sharder
- type TimestampEntry
Constants ¶
const BackupMetadataTypeCode = 30
const CephObjectTypeCode = 20
const EtcdRecordsTypeCode = 10
type code = 1
const MaxFileSize = 2 * 1024 * 1024 * 1024
Variables ¶
var Sentinel = []byte{0xbd, 0xdb, 0x55, 0xaa}
Functions ¶
func ReadIncrementalMetadata ¶
func ReadIncrementalMetadata(fw *FrameWriter, olddir string)
Types ¶
type BackupMetadata ¶
type BackupMetadata struct { NumberOfFiles int Timestamps []TimestampEntry }
func (*BackupMetadata) GetType ¶
func (bm *BackupMetadata) GetType() int
func (*BackupMetadata) MarshalMsg ¶
func (z *BackupMetadata) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*BackupMetadata) Msgsize ¶
func (z *BackupMetadata) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*BackupMetadata) UnmarshalMsg ¶
func (z *BackupMetadata) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type CephObject ¶
type CephObject struct { OMAPData []KeyValue XATTRData []KeyValue Content []byte Name string Namespace string Pool string }
func (*CephObject) GetType ¶
func (c *CephObject) GetType() int
func (*CephObject) MarshalMsg ¶
func (z *CephObject) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*CephObject) Msgsize ¶
func (z *CephObject) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*CephObject) UnmarshalMsg ¶
func (z *CephObject) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type EtcdRecords ¶
type EtcdRecords struct {
KVz []KeyValue
}
func (*EtcdRecords) GetType ¶
func (e *EtcdRecords) GetType() int
func (*EtcdRecords) MarshalMsg ¶
func (z *EtcdRecords) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*EtcdRecords) Msgsize ¶
func (z *EtcdRecords) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*EtcdRecords) UnmarshalMsg ¶
func (z *EtcdRecords) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler
type Frame ¶
A backup archive consists of N numbered files and a header file. To recover the backup, you process the N numbered files in order. Each of them has an arbitrary number of frames inside and each one describes an operation on ceph or a set of operations on etcd. Each frame is individually encrypted with GCM
type FrameWriter ¶
type FrameWriter struct {
// contains filtered or unexported fields
}
func NewFrameWriter ¶
func NewFrameWriter(passphrase string) *FrameWriter
type KeyValue ¶
func (*KeyValue) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type MK ¶
func (MK) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type ProcessArgs ¶
type Sharder ¶
type Sharder struct {
// contains filtered or unexported fields
}
func NewReadSharder ¶
func NewReadSharder(fw *FrameWriter, directory string) *Sharder
func NewWriteSharder ¶
func NewWriteSharder(fw *FrameWriter) *Sharder
func (*Sharder) Metadata ¶
func (s *Sharder) Metadata() *BackupMetadata
type TimestampEntry ¶
func (*TimestampEntry) MarshalMsg ¶
func (z *TimestampEntry) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*TimestampEntry) Msgsize ¶
func (z *TimestampEntry) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*TimestampEntry) UnmarshalMsg ¶
func (z *TimestampEntry) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler