Documentation
¶
Index ¶
- Constants
- Variables
- type Backend
- type BackendFactory
- type Controller
- type DataProcessor
- type DiffDisk
- type DiskInfo
- type Frontend
- type HoleChannelOps
- type IOStats
- type IOs
- type Interface
- type Mode
- type MonitorChannel
- type PeerDetails
- type ReaderWriterAt
- type RegReplica
- type Replica
- type ReplicaInfo
- type Server
- type Snapshot
- type State
- type Stats
- type SyncInfo
- type Target
- type VolUsage
Constants ¶
View Source
const ( WO = Mode("WO") RW = Mode("RW") ERR = Mode("ERR") INIT = Mode("INIT") CLOSED = Mode("CLOSED") StateUp = State("Up") StateDown = State("Down") RebuildPending = "Pending" RebuildInProgress = "InProgress" RebuildCompleted = "Completed" SyncHTTPClientTimeoutKey = "SYNC_HTTP_CLIENT_TIMEOUT" )
Variables ¶
View Source
var ( // RPCReadTimeout ... RPCReadTimeout time.Duration // RPCWriteTimeout ... RPCWriteTimeout time.Duration )
View Source
var MaxChainLength int
View Source
var ( // ShouldPunchHoles is a flag used to verify if // we should punch holes. ShouldPunchHoles bool )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { IOs Snapshot(name string, userCreated bool, created string) error Resize(name string, size string) error Size() (int64, error) SectorSize() (int64, error) RemainSnapshots() (int, error) GetRevisionCounter() (int64, error) GetCloneStatus() (string, error) GetVolUsage() (VolUsage, error) SetReplicaMode(mode Mode) error SetRevisionCounter(counter int64) error SetRebuilding(rebuilding bool) error GetMonitorChannel() MonitorChannel StopMonitoring() }
type BackendFactory ¶
type Controller ¶
type DataProcessor ¶
type HoleChannelOps ¶
type HoleChannelOps int
HoleChannelOps is the operation that has to be performed on HoleCreatorChan such as DrainStart, DrainDone for draining the chan and notify the caller if drain is done.
const ( // DrainStart flag is used to notify CreateHoles goroutine // for draining the data in HoleCreatorChan DrainStart HoleChannelOps = iota + 1 // DrainDone flag is used to notify the s.Close that data // from HoleCreatorChan has been flushed DrainDone )
var DrainOps HoleChannelOps
DrainOps is flag used for various operations on HoleCreatorChan
type MonitorChannel ¶
type MonitorChannel chan error
type PeerDetails ¶
type RegReplica ¶
type ReplicaInfo ¶
type ReplicaInfo struct { Dirty bool `json:"dirty"` Rebuilding bool `json:"rebuilding"` Head string `json:"head"` Parent string `json:"parent"` Size string `json:"size"` SectorSize int64 `json:"sectorSize"` State string `json:"state"` Chain []string `json:"chain"` Disks map[string]DiskInfo `json:"disks"` RemainSnapshots int `json:"remainsnapshots"` ReplicaMode string `json:"replicamode"` RevisionCounter string `json:"revisioncounter"` UsedLogicalBlocks string `json:"usedlogicalblocks"` UsedBlocks string `json:"usedblocks"` CloneStatus string `json:"clonestatus"` }
type Server ¶
type Server interface { ReaderWriterAt Controller }
type Snapshot ¶
type Snapshot struct { Name string `json:"name,omitempty"` RWSize string `json:"rwsize,omitempty"` WOSize string `json:"wosize,omitempty"` Status string `json:"status,omitempty"` }
Snapshot holds the information of snapshot size of RW and WO replicas and status of rebuild progress.
type SyncInfo ¶
type SyncInfo struct { // Snapshots holds the map of snapshot names and their details Snapshots []Snapshot `json:"snapshots,omitempty"` RWReplica string `json:"rwreplica,omitempty"` WOReplica string `json:"woreplica,omitempty"` // RWSnapshotsTotalSize holds the total size consumed by the snapshots // in RW replica RWSnapshotsTotalSize string `json:"rwreplicatotalsize,omitempty"` // WOSnapshotsTotalSize holds the total size consumed by the snapshots // in WO replica WOSnapshotsTotalSize string `json:"woreplicatotalsize,omitempty"` }
SyncInfo holds the information of snapshots and its progress during rebuilding.
Click to show internal directories.
Click to hide internal directories.