Documentation ¶
Index ¶
- Constants
- Variables
- func ProgressReader(op *operations.Operation, key string, description string) func(io.ReadCloser) io.ReadCloser
- func ProgressTracker(op *operations.Operation, key string, description string) *ioprogress.ProgressTracker
- func ProgressWriter(op *operations.Operation, key string, description string) func(io.WriteCloser) io.WriteCloser
- func ProtoRecv(ws *websocket.Conn, msg proto.Message) error
- func ProtoSend(ws *websocket.Conn, msg proto.Message) error
- func ProtoSendControl(ws *websocket.Conn, err error)
- type BtrfsFeatures
- func (*BtrfsFeatures) Descriptor() ([]byte, []int)
- func (m *BtrfsFeatures) GetHeaderSubvolumes() bool
- func (m *BtrfsFeatures) GetMigrationHeader() bool
- func (*BtrfsFeatures) ProtoMessage()
- func (m *BtrfsFeatures) Reset()
- func (m *BtrfsFeatures) String() string
- func (m *BtrfsFeatures) XXX_DiscardUnknown()
- func (m *BtrfsFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BtrfsFeatures) XXX_Merge(src proto.Message)
- func (m *BtrfsFeatures) XXX_Size() int
- func (m *BtrfsFeatures) XXX_Unmarshal(b []byte) error
- type CRIUType
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetKey() string
- func (m *Config) GetValue() string
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Config) XXX_Merge(src proto.Message)
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type Device
- func (*Device) Descriptor() ([]byte, []int)
- func (m *Device) GetConfig() []*Config
- func (m *Device) GetName() string
- func (*Device) ProtoMessage()
- func (m *Device) Reset()
- func (m *Device) String() string
- func (m *Device) XXX_DiscardUnknown()
- func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Device) XXX_Merge(src proto.Message)
- func (m *Device) XXX_Size() int
- func (m *Device) XXX_Unmarshal(b []byte) error
- type DumpStatsEntry
- func (*DumpStatsEntry) Descriptor() ([]byte, []int)
- func (m *DumpStatsEntry) GetFreezingTime() uint32
- func (m *DumpStatsEntry) GetFrozenTime() uint32
- func (m *DumpStatsEntry) GetIrmapResolve() uint32
- func (m *DumpStatsEntry) GetMemdumpTime() uint32
- func (m *DumpStatsEntry) GetMemwriteTime() uint32
- func (m *DumpStatsEntry) GetPagePipeBufs() uint64
- func (m *DumpStatsEntry) GetPagePipes() uint64
- func (m *DumpStatsEntry) GetPagesLazy() uint64
- func (m *DumpStatsEntry) GetPagesScanned() uint64
- func (m *DumpStatsEntry) GetPagesSkippedParent() uint64
- func (m *DumpStatsEntry) GetPagesWritten() uint64
- func (*DumpStatsEntry) ProtoMessage()
- func (m *DumpStatsEntry) Reset()
- func (m *DumpStatsEntry) String() string
- func (m *DumpStatsEntry) XXX_DiscardUnknown()
- func (m *DumpStatsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DumpStatsEntry) XXX_Merge(src proto.Message)
- func (m *DumpStatsEntry) XXX_Size() int
- func (m *DumpStatsEntry) XXX_Unmarshal(b []byte) error
- type IDMapType
- func (*IDMapType) Descriptor() ([]byte, []int)
- func (m *IDMapType) GetHostid() int32
- func (m *IDMapType) GetIsgid() bool
- func (m *IDMapType) GetIsuid() bool
- func (m *IDMapType) GetMaprange() int32
- func (m *IDMapType) GetNsid() int32
- func (*IDMapType) ProtoMessage()
- func (m *IDMapType) Reset()
- func (m *IDMapType) String() string
- func (m *IDMapType) XXX_DiscardUnknown()
- func (m *IDMapType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *IDMapType) XXX_Merge(src proto.Message)
- func (m *IDMapType) XXX_Size() int
- func (m *IDMapType) XXX_Unmarshal(b []byte) error
- type MigrationControl
- func (*MigrationControl) Descriptor() ([]byte, []int)
- func (m *MigrationControl) GetMessage() string
- func (m *MigrationControl) GetSuccess() bool
- func (*MigrationControl) ProtoMessage()
- func (m *MigrationControl) Reset()
- func (m *MigrationControl) String() string
- func (m *MigrationControl) XXX_DiscardUnknown()
- func (m *MigrationControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MigrationControl) XXX_Merge(src proto.Message)
- func (m *MigrationControl) XXX_Size() int
- func (m *MigrationControl) XXX_Unmarshal(b []byte) error
- type MigrationFSType
- type MigrationHeader
- func (*MigrationHeader) Descriptor() ([]byte, []int)
- func (m *MigrationHeader) GetBtrfsFeatures() *BtrfsFeatures
- func (m *MigrationHeader) GetBtrfsFeaturesSlice() []string
- func (m *MigrationHeader) GetCriu() CRIUType
- func (m *MigrationHeader) GetFs() MigrationFSType
- func (m *MigrationHeader) GetIdmap() []*IDMapType
- func (m *MigrationHeader) GetPredump() bool
- func (m *MigrationHeader) GetRefresh() bool
- func (m *MigrationHeader) GetRsyncFeatures() *RsyncFeatures
- func (m *MigrationHeader) GetRsyncFeaturesSlice() []string
- func (m *MigrationHeader) GetSnapshotNames() []string
- func (m *MigrationHeader) GetSnapshots() []*Snapshot
- func (m *MigrationHeader) GetVolumeSize() int64
- func (m *MigrationHeader) GetZfsFeatures() *ZfsFeatures
- func (m *MigrationHeader) GetZfsFeaturesSlice() []string
- func (*MigrationHeader) ProtoMessage()
- func (m *MigrationHeader) Reset()
- func (m *MigrationHeader) String() string
- func (m *MigrationHeader) XXX_DiscardUnknown()
- func (m *MigrationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MigrationHeader) XXX_Merge(src proto.Message)
- func (m *MigrationHeader) XXX_Size() int
- func (m *MigrationHeader) XXX_Unmarshal(b []byte) error
- type MigrationSync
- func (*MigrationSync) Descriptor() ([]byte, []int)
- func (m *MigrationSync) GetFinalPreDump() bool
- func (*MigrationSync) ProtoMessage()
- func (m *MigrationSync) Reset()
- func (m *MigrationSync) String() string
- func (m *MigrationSync) XXX_DiscardUnknown()
- func (m *MigrationSync) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MigrationSync) XXX_Merge(src proto.Message)
- func (m *MigrationSync) XXX_Size() int
- func (m *MigrationSync) XXX_Unmarshal(b []byte) error
- type RestoreStatsEntry
- func (*RestoreStatsEntry) Descriptor() ([]byte, []int)
- func (m *RestoreStatsEntry) GetForkingTime() uint32
- func (m *RestoreStatsEntry) GetPagesCompared() uint64
- func (m *RestoreStatsEntry) GetPagesRestored() uint64
- func (m *RestoreStatsEntry) GetPagesSkippedCow() uint64
- func (m *RestoreStatsEntry) GetRestoreTime() uint32
- func (*RestoreStatsEntry) ProtoMessage()
- func (m *RestoreStatsEntry) Reset()
- func (m *RestoreStatsEntry) String() string
- func (m *RestoreStatsEntry) XXX_DiscardUnknown()
- func (m *RestoreStatsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RestoreStatsEntry) XXX_Merge(src proto.Message)
- func (m *RestoreStatsEntry) XXX_Size() int
- func (m *RestoreStatsEntry) XXX_Unmarshal(b []byte) error
- type RsyncFeatures
- func (*RsyncFeatures) Descriptor() ([]byte, []int)
- func (m *RsyncFeatures) GetBidirectional() bool
- func (m *RsyncFeatures) GetCompress() bool
- func (m *RsyncFeatures) GetDelete() bool
- func (m *RsyncFeatures) GetXattrs() bool
- func (*RsyncFeatures) ProtoMessage()
- func (m *RsyncFeatures) Reset()
- func (m *RsyncFeatures) String() string
- func (m *RsyncFeatures) XXX_DiscardUnknown()
- func (m *RsyncFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RsyncFeatures) XXX_Merge(src proto.Message)
- func (m *RsyncFeatures) XXX_Size() int
- func (m *RsyncFeatures) XXX_Unmarshal(b []byte) error
- type Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)
- func (m *Snapshot) GetArchitecture() int32
- func (m *Snapshot) GetCreationDate() int64
- func (m *Snapshot) GetEphemeral() bool
- func (m *Snapshot) GetLastUsedDate() int64
- func (m *Snapshot) GetLocalConfig() []*Config
- func (m *Snapshot) GetLocalDevices() []*Device
- func (m *Snapshot) GetName() string
- func (m *Snapshot) GetProfiles() []string
- func (m *Snapshot) GetStateful() bool
- func (*Snapshot) ProtoMessage()
- func (m *Snapshot) Reset()
- func (m *Snapshot) String() string
- func (m *Snapshot) XXX_DiscardUnknown()
- func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Snapshot) XXX_Merge(src proto.Message)
- func (m *Snapshot) XXX_Size() int
- func (m *Snapshot) XXX_Unmarshal(b []byte) error
- type StatsEntry
- func (*StatsEntry) Descriptor() ([]byte, []int)
- func (m *StatsEntry) GetDump() *DumpStatsEntry
- func (m *StatsEntry) GetRestore() *RestoreStatsEntry
- func (*StatsEntry) ProtoMessage()
- func (m *StatsEntry) Reset()
- func (m *StatsEntry) String() string
- func (m *StatsEntry) XXX_DiscardUnknown()
- func (m *StatsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StatsEntry) XXX_Merge(src proto.Message)
- func (m *StatsEntry) XXX_Size() int
- func (m *StatsEntry) XXX_Unmarshal(b []byte) error
- type Type
- type VolumeSourceArgs
- type VolumeTargetArgs
- type ZfsFeatures
- func (*ZfsFeatures) Descriptor() ([]byte, []int)
- func (m *ZfsFeatures) GetCompress() bool
- func (*ZfsFeatures) ProtoMessage()
- func (m *ZfsFeatures) Reset()
- func (m *ZfsFeatures) String() string
- func (m *ZfsFeatures) XXX_DiscardUnknown()
- func (m *ZfsFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ZfsFeatures) XXX_Merge(src proto.Message)
- func (m *ZfsFeatures) XXX_Size() int
- func (m *ZfsFeatures) XXX_Unmarshal(b []byte) error
Constants ¶
const BTRFSFeatureMigrationHeader = "migration_header"
BTRFSFeatureMigrationHeader indicates a migration header will be sent/recv in data channel first.
const BTRFSFeatureSubvolumes = "header_subvolumes"
BTRFSFeatureSubvolumes indicates migration can send/recv subvolumes.
Variables ¶
var CRIUType_name = map[int32]string{
0: "CRIU_RSYNC",
1: "PHAUL",
2: "NONE",
}
var CRIUType_value = map[string]int32{
"CRIU_RSYNC": 0,
"PHAUL": 1,
"NONE": 2,
}
var MigrationFSType_name = map[int32]string{
0: "RSYNC",
1: "BTRFS",
2: "ZFS",
3: "RBD",
4: "BLOCK_AND_RSYNC",
}
var MigrationFSType_value = map[string]int32{
"RSYNC": 0,
"BTRFS": 1,
"ZFS": 2,
"RBD": 3,
"BLOCK_AND_RSYNC": 4,
}
Functions ¶
func ProgressReader ¶
func ProgressReader(op *operations.Operation, key string, description string) func(io.ReadCloser) io.ReadCloser
ProgressReader reports the read progress.
func ProgressTracker ¶
func ProgressTracker(op *operations.Operation, key string, description string) *ioprogress.ProgressTracker
ProgressTracker returns a migration I/O tracker
func ProgressWriter ¶
func ProgressWriter(op *operations.Operation, key string, description string) func(io.WriteCloser) io.WriteCloser
ProgressWriter reports the write progress.
func ProtoSendControl ¶
ProtoSendControl sends a migration control message over a websocket
Types ¶
type BtrfsFeatures ¶
type BtrfsFeatures struct { MigrationHeader *bool `protobuf:"varint,1,opt,name=migration_header,json=migrationHeader" json:"migration_header,omitempty"` HeaderSubvolumes *bool `protobuf:"varint,2,opt,name=header_subvolumes,json=headerSubvolumes" json:"header_subvolumes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BtrfsFeatures) Descriptor ¶
func (*BtrfsFeatures) Descriptor() ([]byte, []int)
func (*BtrfsFeatures) GetHeaderSubvolumes ¶
func (m *BtrfsFeatures) GetHeaderSubvolumes() bool
func (*BtrfsFeatures) GetMigrationHeader ¶
func (m *BtrfsFeatures) GetMigrationHeader() bool
func (*BtrfsFeatures) ProtoMessage ¶
func (*BtrfsFeatures) ProtoMessage()
func (*BtrfsFeatures) Reset ¶
func (m *BtrfsFeatures) Reset()
func (*BtrfsFeatures) String ¶
func (m *BtrfsFeatures) String() string
func (*BtrfsFeatures) XXX_DiscardUnknown ¶
func (m *BtrfsFeatures) XXX_DiscardUnknown()
func (*BtrfsFeatures) XXX_Marshal ¶
func (m *BtrfsFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BtrfsFeatures) XXX_Merge ¶
func (m *BtrfsFeatures) XXX_Merge(src proto.Message)
func (*BtrfsFeatures) XXX_Size ¶
func (m *BtrfsFeatures) XXX_Size() int
func (*BtrfsFeatures) XXX_Unmarshal ¶
func (m *BtrfsFeatures) XXX_Unmarshal(b []byte) error
type CRIUType ¶
type CRIUType int32
func (CRIUType) EnumDescriptor ¶
func (*CRIUType) UnmarshalJSON ¶
type Config ¶
type Config struct { Key *string `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Config) Descriptor ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶
func (*Config) XXX_Unmarshal ¶
type Device ¶
type Device struct { Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` Config []*Config `protobuf:"bytes,2,rep,name=config" json:"config,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Device) Descriptor ¶
func (*Device) ProtoMessage ¶
func (*Device) ProtoMessage()
func (*Device) XXX_DiscardUnknown ¶
func (m *Device) XXX_DiscardUnknown()
func (*Device) XXX_Marshal ¶
func (*Device) XXX_Unmarshal ¶
type DumpStatsEntry ¶
type DumpStatsEntry struct { FreezingTime *uint32 `protobuf:"varint,1,req,name=freezing_time,json=freezingTime" json:"freezing_time,omitempty"` FrozenTime *uint32 `protobuf:"varint,2,req,name=frozen_time,json=frozenTime" json:"frozen_time,omitempty"` MemdumpTime *uint32 `protobuf:"varint,3,req,name=memdump_time,json=memdumpTime" json:"memdump_time,omitempty"` MemwriteTime *uint32 `protobuf:"varint,4,req,name=memwrite_time,json=memwriteTime" json:"memwrite_time,omitempty"` PagesScanned *uint64 `protobuf:"varint,5,req,name=pages_scanned,json=pagesScanned" json:"pages_scanned,omitempty"` PagesSkippedParent *uint64 `protobuf:"varint,6,req,name=pages_skipped_parent,json=pagesSkippedParent" json:"pages_skipped_parent,omitempty"` PagesWritten *uint64 `protobuf:"varint,7,req,name=pages_written,json=pagesWritten" json:"pages_written,omitempty"` IrmapResolve *uint32 `protobuf:"varint,8,opt,name=irmap_resolve,json=irmapResolve" json:"irmap_resolve,omitempty"` PagesLazy *uint64 `protobuf:"varint,9,req,name=pages_lazy,json=pagesLazy" json:"pages_lazy,omitempty"` PagePipes *uint64 `protobuf:"varint,10,opt,name=page_pipes,json=pagePipes" json:"page_pipes,omitempty"` PagePipeBufs *uint64 `protobuf:"varint,11,opt,name=page_pipe_bufs,json=pagePipeBufs" json:"page_pipe_bufs,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
This one contains statistics about dump/restore process
func (*DumpStatsEntry) Descriptor ¶
func (*DumpStatsEntry) Descriptor() ([]byte, []int)
func (*DumpStatsEntry) GetFreezingTime ¶
func (m *DumpStatsEntry) GetFreezingTime() uint32
func (*DumpStatsEntry) GetFrozenTime ¶
func (m *DumpStatsEntry) GetFrozenTime() uint32
func (*DumpStatsEntry) GetIrmapResolve ¶
func (m *DumpStatsEntry) GetIrmapResolve() uint32
func (*DumpStatsEntry) GetMemdumpTime ¶
func (m *DumpStatsEntry) GetMemdumpTime() uint32
func (*DumpStatsEntry) GetMemwriteTime ¶
func (m *DumpStatsEntry) GetMemwriteTime() uint32
func (*DumpStatsEntry) GetPagePipeBufs ¶
func (m *DumpStatsEntry) GetPagePipeBufs() uint64
func (*DumpStatsEntry) GetPagePipes ¶
func (m *DumpStatsEntry) GetPagePipes() uint64
func (*DumpStatsEntry) GetPagesLazy ¶
func (m *DumpStatsEntry) GetPagesLazy() uint64
func (*DumpStatsEntry) GetPagesScanned ¶
func (m *DumpStatsEntry) GetPagesScanned() uint64
func (*DumpStatsEntry) GetPagesSkippedParent ¶
func (m *DumpStatsEntry) GetPagesSkippedParent() uint64
func (*DumpStatsEntry) GetPagesWritten ¶
func (m *DumpStatsEntry) GetPagesWritten() uint64
func (*DumpStatsEntry) ProtoMessage ¶
func (*DumpStatsEntry) ProtoMessage()
func (*DumpStatsEntry) Reset ¶
func (m *DumpStatsEntry) Reset()
func (*DumpStatsEntry) String ¶
func (m *DumpStatsEntry) String() string
func (*DumpStatsEntry) XXX_DiscardUnknown ¶
func (m *DumpStatsEntry) XXX_DiscardUnknown()
func (*DumpStatsEntry) XXX_Marshal ¶
func (m *DumpStatsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DumpStatsEntry) XXX_Merge ¶
func (m *DumpStatsEntry) XXX_Merge(src proto.Message)
func (*DumpStatsEntry) XXX_Size ¶
func (m *DumpStatsEntry) XXX_Size() int
func (*DumpStatsEntry) XXX_Unmarshal ¶
func (m *DumpStatsEntry) XXX_Unmarshal(b []byte) error
type IDMapType ¶
type IDMapType struct { Isuid *bool `protobuf:"varint,1,req,name=isuid" json:"isuid,omitempty"` Isgid *bool `protobuf:"varint,2,req,name=isgid" json:"isgid,omitempty"` Hostid *int32 `protobuf:"varint,3,req,name=hostid" json:"hostid,omitempty"` Nsid *int32 `protobuf:"varint,4,req,name=nsid" json:"nsid,omitempty"` Maprange *int32 `protobuf:"varint,5,req,name=maprange" json:"maprange,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*IDMapType) Descriptor ¶
func (*IDMapType) GetMaprange ¶
func (*IDMapType) ProtoMessage ¶
func (*IDMapType) ProtoMessage()
func (*IDMapType) XXX_DiscardUnknown ¶
func (m *IDMapType) XXX_DiscardUnknown()
func (*IDMapType) XXX_Marshal ¶
func (*IDMapType) XXX_Unmarshal ¶
type MigrationControl ¶
type MigrationControl struct { Success *bool `protobuf:"varint,1,req,name=success" json:"success,omitempty"` // optional failure message if sending a failure Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MigrationControl) Descriptor ¶
func (*MigrationControl) Descriptor() ([]byte, []int)
func (*MigrationControl) GetMessage ¶
func (m *MigrationControl) GetMessage() string
func (*MigrationControl) GetSuccess ¶
func (m *MigrationControl) GetSuccess() bool
func (*MigrationControl) ProtoMessage ¶
func (*MigrationControl) ProtoMessage()
func (*MigrationControl) Reset ¶
func (m *MigrationControl) Reset()
func (*MigrationControl) String ¶
func (m *MigrationControl) String() string
func (*MigrationControl) XXX_DiscardUnknown ¶
func (m *MigrationControl) XXX_DiscardUnknown()
func (*MigrationControl) XXX_Marshal ¶
func (m *MigrationControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MigrationControl) XXX_Merge ¶
func (m *MigrationControl) XXX_Merge(src proto.Message)
func (*MigrationControl) XXX_Size ¶
func (m *MigrationControl) XXX_Size() int
func (*MigrationControl) XXX_Unmarshal ¶
func (m *MigrationControl) XXX_Unmarshal(b []byte) error
type MigrationFSType ¶
type MigrationFSType int32
const ( MigrationFSType_RSYNC MigrationFSType = 0 MigrationFSType_BTRFS MigrationFSType = 1 MigrationFSType_ZFS MigrationFSType = 2 MigrationFSType_RBD MigrationFSType = 3 MigrationFSType_BLOCK_AND_RSYNC MigrationFSType = 4 )
func (MigrationFSType) Enum ¶
func (x MigrationFSType) Enum() *MigrationFSType
func (MigrationFSType) EnumDescriptor ¶
func (MigrationFSType) EnumDescriptor() ([]byte, []int)
func (MigrationFSType) String ¶
func (x MigrationFSType) String() string
func (*MigrationFSType) UnmarshalJSON ¶
func (x *MigrationFSType) UnmarshalJSON(data []byte) error
type MigrationHeader ¶
type MigrationHeader struct { Fs *MigrationFSType `protobuf:"varint,1,req,name=fs,enum=migration.MigrationFSType" json:"fs,omitempty"` Criu *CRIUType `protobuf:"varint,2,opt,name=criu,enum=migration.CRIUType" json:"criu,omitempty"` Idmap []*IDMapType `protobuf:"bytes,3,rep,name=idmap" json:"idmap,omitempty"` SnapshotNames []string `protobuf:"bytes,4,rep,name=snapshotNames" json:"snapshotNames,omitempty"` Snapshots []*Snapshot `protobuf:"bytes,5,rep,name=snapshots" json:"snapshots,omitempty"` Predump *bool `protobuf:"varint,7,opt,name=predump" json:"predump,omitempty"` RsyncFeatures *RsyncFeatures `protobuf:"bytes,8,opt,name=rsyncFeatures" json:"rsyncFeatures,omitempty"` Refresh *bool `protobuf:"varint,9,opt,name=refresh" json:"refresh,omitempty"` ZfsFeatures *ZfsFeatures `protobuf:"bytes,10,opt,name=zfsFeatures" json:"zfsFeatures,omitempty"` VolumeSize *int64 `protobuf:"varint,11,opt,name=volumeSize" json:"volumeSize,omitempty"` BtrfsFeatures *BtrfsFeatures `protobuf:"bytes,12,opt,name=btrfsFeatures" json:"btrfsFeatures,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func TypesToHeader ¶
func TypesToHeader(types ...Type) MigrationHeader
TypesToHeader converts one or more Types to a MigrationHeader. It uses the first type argument supplied to indicate the preferred migration method and sets the MigrationHeader's Fs type to that. If the preferred type is ZFS then it will also set the header's optional ZfsFeatures. If the fallback Rsync type is present in any of the types even if it is not preferred, then its optional features are added to the header's RsyncFeatures, allowing for fallback negotiation to take place on the farside.
func (*MigrationHeader) Descriptor ¶
func (*MigrationHeader) Descriptor() ([]byte, []int)
func (*MigrationHeader) GetBtrfsFeatures ¶
func (m *MigrationHeader) GetBtrfsFeatures() *BtrfsFeatures
func (*MigrationHeader) GetBtrfsFeaturesSlice ¶
func (m *MigrationHeader) GetBtrfsFeaturesSlice() []string
GetBtrfsFeaturesSlice returns a slice of strings representing the supported BTRFS features.
func (*MigrationHeader) GetCriu ¶
func (m *MigrationHeader) GetCriu() CRIUType
func (*MigrationHeader) GetFs ¶
func (m *MigrationHeader) GetFs() MigrationFSType
func (*MigrationHeader) GetIdmap ¶
func (m *MigrationHeader) GetIdmap() []*IDMapType
func (*MigrationHeader) GetPredump ¶
func (m *MigrationHeader) GetPredump() bool
func (*MigrationHeader) GetRefresh ¶
func (m *MigrationHeader) GetRefresh() bool
func (*MigrationHeader) GetRsyncFeatures ¶
func (m *MigrationHeader) GetRsyncFeatures() *RsyncFeatures
func (*MigrationHeader) GetRsyncFeaturesSlice ¶
func (m *MigrationHeader) GetRsyncFeaturesSlice() []string
GetRsyncFeaturesSlice returns a slice of strings representing the supported RSYNC features
func (*MigrationHeader) GetSnapshotNames ¶
func (m *MigrationHeader) GetSnapshotNames() []string
func (*MigrationHeader) GetSnapshots ¶
func (m *MigrationHeader) GetSnapshots() []*Snapshot
func (*MigrationHeader) GetVolumeSize ¶
func (m *MigrationHeader) GetVolumeSize() int64
func (*MigrationHeader) GetZfsFeatures ¶
func (m *MigrationHeader) GetZfsFeatures() *ZfsFeatures
func (*MigrationHeader) GetZfsFeaturesSlice ¶
func (m *MigrationHeader) GetZfsFeaturesSlice() []string
GetZfsFeaturesSlice returns a slice of strings representing the supported ZFS features
func (*MigrationHeader) ProtoMessage ¶
func (*MigrationHeader) ProtoMessage()
func (*MigrationHeader) Reset ¶
func (m *MigrationHeader) Reset()
func (*MigrationHeader) String ¶
func (m *MigrationHeader) String() string
func (*MigrationHeader) XXX_DiscardUnknown ¶
func (m *MigrationHeader) XXX_DiscardUnknown()
func (*MigrationHeader) XXX_Marshal ¶
func (m *MigrationHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MigrationHeader) XXX_Merge ¶
func (m *MigrationHeader) XXX_Merge(src proto.Message)
func (*MigrationHeader) XXX_Size ¶
func (m *MigrationHeader) XXX_Size() int
func (*MigrationHeader) XXX_Unmarshal ¶
func (m *MigrationHeader) XXX_Unmarshal(b []byte) error
type MigrationSync ¶
type MigrationSync struct { FinalPreDump *bool `protobuf:"varint,1,req,name=finalPreDump" json:"finalPreDump,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MigrationSync) Descriptor ¶
func (*MigrationSync) Descriptor() ([]byte, []int)
func (*MigrationSync) GetFinalPreDump ¶
func (m *MigrationSync) GetFinalPreDump() bool
func (*MigrationSync) ProtoMessage ¶
func (*MigrationSync) ProtoMessage()
func (*MigrationSync) Reset ¶
func (m *MigrationSync) Reset()
func (*MigrationSync) String ¶
func (m *MigrationSync) String() string
func (*MigrationSync) XXX_DiscardUnknown ¶
func (m *MigrationSync) XXX_DiscardUnknown()
func (*MigrationSync) XXX_Marshal ¶
func (m *MigrationSync) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MigrationSync) XXX_Merge ¶
func (m *MigrationSync) XXX_Merge(src proto.Message)
func (*MigrationSync) XXX_Size ¶
func (m *MigrationSync) XXX_Size() int
func (*MigrationSync) XXX_Unmarshal ¶
func (m *MigrationSync) XXX_Unmarshal(b []byte) error
type RestoreStatsEntry ¶
type RestoreStatsEntry struct { PagesCompared *uint64 `protobuf:"varint,1,req,name=pages_compared,json=pagesCompared" json:"pages_compared,omitempty"` PagesSkippedCow *uint64 `protobuf:"varint,2,req,name=pages_skipped_cow,json=pagesSkippedCow" json:"pages_skipped_cow,omitempty"` ForkingTime *uint32 `protobuf:"varint,3,req,name=forking_time,json=forkingTime" json:"forking_time,omitempty"` RestoreTime *uint32 `protobuf:"varint,4,req,name=restore_time,json=restoreTime" json:"restore_time,omitempty"` PagesRestored *uint64 `protobuf:"varint,5,opt,name=pages_restored,json=pagesRestored" json:"pages_restored,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RestoreStatsEntry) Descriptor ¶
func (*RestoreStatsEntry) Descriptor() ([]byte, []int)
func (*RestoreStatsEntry) GetForkingTime ¶
func (m *RestoreStatsEntry) GetForkingTime() uint32
func (*RestoreStatsEntry) GetPagesCompared ¶
func (m *RestoreStatsEntry) GetPagesCompared() uint64
func (*RestoreStatsEntry) GetPagesRestored ¶
func (m *RestoreStatsEntry) GetPagesRestored() uint64
func (*RestoreStatsEntry) GetPagesSkippedCow ¶
func (m *RestoreStatsEntry) GetPagesSkippedCow() uint64
func (*RestoreStatsEntry) GetRestoreTime ¶
func (m *RestoreStatsEntry) GetRestoreTime() uint32
func (*RestoreStatsEntry) ProtoMessage ¶
func (*RestoreStatsEntry) ProtoMessage()
func (*RestoreStatsEntry) Reset ¶
func (m *RestoreStatsEntry) Reset()
func (*RestoreStatsEntry) String ¶
func (m *RestoreStatsEntry) String() string
func (*RestoreStatsEntry) XXX_DiscardUnknown ¶
func (m *RestoreStatsEntry) XXX_DiscardUnknown()
func (*RestoreStatsEntry) XXX_Marshal ¶
func (m *RestoreStatsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RestoreStatsEntry) XXX_Merge ¶
func (m *RestoreStatsEntry) XXX_Merge(src proto.Message)
func (*RestoreStatsEntry) XXX_Size ¶
func (m *RestoreStatsEntry) XXX_Size() int
func (*RestoreStatsEntry) XXX_Unmarshal ¶
func (m *RestoreStatsEntry) XXX_Unmarshal(b []byte) error
type RsyncFeatures ¶
type RsyncFeatures struct { Xattrs *bool `protobuf:"varint,1,opt,name=xattrs" json:"xattrs,omitempty"` Delete *bool `protobuf:"varint,2,opt,name=delete" json:"delete,omitempty"` Compress *bool `protobuf:"varint,3,opt,name=compress" json:"compress,omitempty"` Bidirectional *bool `protobuf:"varint,4,opt,name=bidirectional" json:"bidirectional,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RsyncFeatures) Descriptor ¶
func (*RsyncFeatures) Descriptor() ([]byte, []int)
func (*RsyncFeatures) GetBidirectional ¶
func (m *RsyncFeatures) GetBidirectional() bool
func (*RsyncFeatures) GetCompress ¶
func (m *RsyncFeatures) GetCompress() bool
func (*RsyncFeatures) GetDelete ¶
func (m *RsyncFeatures) GetDelete() bool
func (*RsyncFeatures) GetXattrs ¶
func (m *RsyncFeatures) GetXattrs() bool
func (*RsyncFeatures) ProtoMessage ¶
func (*RsyncFeatures) ProtoMessage()
func (*RsyncFeatures) Reset ¶
func (m *RsyncFeatures) Reset()
func (*RsyncFeatures) String ¶
func (m *RsyncFeatures) String() string
func (*RsyncFeatures) XXX_DiscardUnknown ¶
func (m *RsyncFeatures) XXX_DiscardUnknown()
func (*RsyncFeatures) XXX_Marshal ¶
func (m *RsyncFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RsyncFeatures) XXX_Merge ¶
func (m *RsyncFeatures) XXX_Merge(src proto.Message)
func (*RsyncFeatures) XXX_Size ¶
func (m *RsyncFeatures) XXX_Size() int
func (*RsyncFeatures) XXX_Unmarshal ¶
func (m *RsyncFeatures) XXX_Unmarshal(b []byte) error
type Snapshot ¶
type Snapshot struct { Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` LocalConfig []*Config `protobuf:"bytes,2,rep,name=localConfig" json:"localConfig,omitempty"` Profiles []string `protobuf:"bytes,3,rep,name=profiles" json:"profiles,omitempty"` Ephemeral *bool `protobuf:"varint,4,req,name=ephemeral" json:"ephemeral,omitempty"` LocalDevices []*Device `protobuf:"bytes,5,rep,name=localDevices" json:"localDevices,omitempty"` Architecture *int32 `protobuf:"varint,6,req,name=architecture" json:"architecture,omitempty"` Stateful *bool `protobuf:"varint,7,req,name=stateful" json:"stateful,omitempty"` CreationDate *int64 `protobuf:"varint,8,opt,name=creation_date,json=creationDate" json:"creation_date,omitempty"` LastUsedDate *int64 `protobuf:"varint,9,opt,name=last_used_date,json=lastUsedDate" json:"last_used_date,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Snapshot) Descriptor ¶
func (*Snapshot) GetArchitecture ¶
func (*Snapshot) GetCreationDate ¶
func (*Snapshot) GetEphemeral ¶
func (*Snapshot) GetLastUsedDate ¶
func (*Snapshot) GetLocalConfig ¶
func (*Snapshot) GetLocalDevices ¶
func (*Snapshot) GetProfiles ¶
func (*Snapshot) GetStateful ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (*Snapshot) XXX_DiscardUnknown ¶
func (m *Snapshot) XXX_DiscardUnknown()
func (*Snapshot) XXX_Marshal ¶
func (*Snapshot) XXX_Unmarshal ¶
type StatsEntry ¶
type StatsEntry struct { Dump *DumpStatsEntry `protobuf:"bytes,1,opt,name=dump" json:"dump,omitempty"` Restore *RestoreStatsEntry `protobuf:"bytes,2,opt,name=restore" json:"restore,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StatsEntry) Descriptor ¶
func (*StatsEntry) Descriptor() ([]byte, []int)
func (*StatsEntry) GetDump ¶
func (m *StatsEntry) GetDump() *DumpStatsEntry
func (*StatsEntry) GetRestore ¶
func (m *StatsEntry) GetRestore() *RestoreStatsEntry
func (*StatsEntry) ProtoMessage ¶
func (*StatsEntry) ProtoMessage()
func (*StatsEntry) Reset ¶
func (m *StatsEntry) Reset()
func (*StatsEntry) String ¶
func (m *StatsEntry) String() string
func (*StatsEntry) XXX_DiscardUnknown ¶
func (m *StatsEntry) XXX_DiscardUnknown()
func (*StatsEntry) XXX_Marshal ¶
func (m *StatsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StatsEntry) XXX_Merge ¶
func (m *StatsEntry) XXX_Merge(src proto.Message)
func (*StatsEntry) XXX_Size ¶
func (m *StatsEntry) XXX_Size() int
func (*StatsEntry) XXX_Unmarshal ¶
func (m *StatsEntry) XXX_Unmarshal(b []byte) error
type Type ¶
type Type struct { FSType MigrationFSType // Transport mode selected. Features []string // Feature hints for selected FSType transport mode. }
Type represents the migration transport type. It indicates the method by which the migration can take place and what optional features are available.
func MatchTypes ¶
func MatchTypes(offer MigrationHeader, fallbackType MigrationFSType, ourTypes []Type) ([]Type, error)
MatchTypes attempts to find matching migration transport types between an offered type sent from a remote source and the types supported by a local storage pool. If matches are found then one or more Types are returned containing the method and the matching optional features present in both. The function also takes a fallback type which is used as an additional offer type preference in case the preferred remote type is not compatible with the local type available. It is expected that both sides of the migration will support the fallback type for the volume's content type that is being migrated.
type VolumeSourceArgs ¶
type VolumeSourceArgs struct { Name string Snapshots []string MigrationType Type TrackProgress bool MultiSync bool FinalSync bool Data interface{} // Optional store to persist storage driver state between MultiSync phases. ContentType string }
VolumeSourceArgs represents the arguments needed to setup a volume migration source.
type VolumeTargetArgs ¶
type VolumeTargetArgs struct { Name string Description string Config map[string]string Snapshots []string MigrationType Type TrackProgress bool Refresh bool Live bool VolumeSize int64 ContentType string }
VolumeTargetArgs represents the arguments needed to setup a volume migration sink.
type ZfsFeatures ¶
type ZfsFeatures struct { Compress *bool `protobuf:"varint,1,opt,name=compress" json:"compress,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ZfsFeatures) Descriptor ¶
func (*ZfsFeatures) Descriptor() ([]byte, []int)
func (*ZfsFeatures) GetCompress ¶
func (m *ZfsFeatures) GetCompress() bool
func (*ZfsFeatures) ProtoMessage ¶
func (*ZfsFeatures) ProtoMessage()
func (*ZfsFeatures) Reset ¶
func (m *ZfsFeatures) Reset()
func (*ZfsFeatures) String ¶
func (m *ZfsFeatures) String() string
func (*ZfsFeatures) XXX_DiscardUnknown ¶
func (m *ZfsFeatures) XXX_DiscardUnknown()
func (*ZfsFeatures) XXX_Marshal ¶
func (m *ZfsFeatures) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ZfsFeatures) XXX_Merge ¶
func (m *ZfsFeatures) XXX_Merge(src proto.Message)
func (*ZfsFeatures) XXX_Size ¶
func (m *ZfsFeatures) XXX_Size() int
func (*ZfsFeatures) XXX_Unmarshal ¶
func (m *ZfsFeatures) XXX_Unmarshal(b []byte) error