Documentation ¶
Index ¶
- Constants
- func CombineErrors(errorList ...error) (retErr error)
- func GenerateFunctionErrorWithRollback(functionErr, rollbackErr error) error
- func IsAlreadyPurgingError(err error) bool
- func UnmarshalGRPCError(err error) error
- func WrapError(in error, format string, args ...interface{}) error
- type Backend
- type BackendFactory
- type Controller
- type ControllerReplicaInfo
- type DataProcessor
- type DataServerProtocol
- type DiffDisk
- type DiskInfo
- type Error
- type ErrorCode
- type Frontend
- type Metrics
- type Mode
- type MonitorChannel
- type PrepareRemoveAction
- type ProcessState
- type RWMetrics
- type ReaderWriterUnmapperAt
- type Replica
- type ReplicaInfo
- type ReplicaSalvageInfo
- type ReplicaState
- type Server
- type State
- type SyncFileInfo
- type UnmapperAt
- type VolumeInfo
Constants ¶
View Source
const ( ErrorCodeResultUnknown = ErrorCode("ResultUnknown") ErrorCodeFunctionFailedWithoutRollback = ErrorCode("FunctionFailedWithoutRollback") ErrorCodeFunctionFailedRollbackSucceeded = ErrorCode("FunctionFailedRollbackSucceeded") ErrorCodeFunctionFailedRollbackFailed = ErrorCode("FunctionFailedRollbackFailed") )
View Source
const ( WO = Mode("WO") RW = Mode("RW") ERR = Mode("ERR") ProcessStateComplete = ProcessState("complete") ProcessStateError = ProcessState("error") ProcessStateInProgress = ProcessState("in_progress") StateUp = State("up") StateDown = State("down") AWSAccessKey = "AWS_ACCESS_KEY_ID" AWSSecretKey = "AWS_SECRET_ACCESS_KEY" AWSEndPoint = "AWS_ENDPOINTS" AWSCert = "AWS_CERT" CIFSUsername = "CIFS_USERNAME" CIFSPassword = "CIFS_PASSWORD" AZBlobAccountName = "AZBLOB_ACCOUNT_NAME" AZBlobAccountKey = "AZBLOB_ACCOUNT_KEY" AZBlobEndpoint = "AZBLOB_ENDPOINT" AZBlobCert = "AZBLOB_CERT" HTTPSProxy = "HTTPS_PROXY" HTTPProxy = "HTTP_PROXY" NOProxy = "NO_PROXY" VirtualHostedStyle = "VIRTUAL_HOSTED_STYLE" RetryCounts = 30 RetryInterval = 1 * time.Second EngineFrontendBlockDev = "tgt-blockdev" EngineFrontendISCSI = "tgt-iscsi" VolumeHeadName = "volume-head" )
View Source
const ( DataServerProtocolTCP = DataServerProtocol("tcp") DataServerProtocolUNIX = DataServerProtocol("unix") )
View Source
const ( ReplicaStateInitial = ReplicaState("initial") ReplicaStateOpen = ReplicaState("open") ReplicaStateClosed = ReplicaState("closed") ReplicaStateDirty = ReplicaState("dirty") ReplicaStateRebuilding = ReplicaState("rebuilding") ReplicaStateError = ReplicaState("error") )
View Source
const ( EventTypeVolume = "volume" EventTypeReplica = "replica" EventTypeMetrics = "metrics" )
View Source
const (
CannotRequestHashingSnapshotPrefix = "cannot request hashing snapshot"
)
Variables ¶
This section is empty.
Functions ¶
func CombineErrors ¶ added in v0.8.1
func GenerateFunctionErrorWithRollback ¶ added in v0.8.1
func IsAlreadyPurgingError ¶
func UnmarshalGRPCError ¶ added in v0.8.1
Types ¶
type Backend ¶
type Backend interface { ReaderWriterUnmapperAt io.Closer Snapshot(name string, userCreated bool, created string, labels map[string]string) error Expand(size int64) error Size() (int64, error) SectorSize() (int64, error) GetRevisionCounter() (int64, error) SetRevisionCounter(counter int64) error GetState() (string, error) GetMonitorChannel() MonitorChannel StopMonitoring() IsRevisionCounterDisabled() (bool, error) GetLastModifyTime() (int64, error) GetHeadFileSize() (int64, error) GetUnmapMarkSnapChainRemoved() (bool, error) SetUnmapMarkSnapChainRemoved(enabled bool) error ResetRebuild() error SetSnapshotMaxCount(count int) error SetSnapshotMaxSize(size int64) error GetSnapshotCountAndSizeUsage() (int, int64, error) }
type BackendFactory ¶
type Controller ¶
type ControllerReplicaInfo ¶
type DataProcessor ¶
type DataProcessor interface { ReaderWriterUnmapperAt PingResponse() error }
type DataServerProtocol ¶ added in v1.4.0
type DataServerProtocol string
type Error ¶ added in v0.8.1
type Error struct { Code ErrorCode `json:"code"` Message string `json:"message"` RollbackMessage string `json:"rollbackMessage"` }
func (*Error) ToJSONString ¶ added in v0.8.1
type MonitorChannel ¶
type MonitorChannel chan error
type PrepareRemoveAction ¶
type ProcessState ¶
type ProcessState string
type ReaderWriterUnmapperAt ¶ added in v1.4.0
type ReaderWriterUnmapperAt interface { io.ReaderAt io.WriterAt UnmapperAt }
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,string"` BackingFile string `json:"backingFile"` State string `json:"state"` Chain []string `json:"chain"` Disks map[string]DiskInfo `json:"disks"` RemainSnapshots int `json:"remainsnapshots"` RevisionCounter int64 `json:"revisioncounter,string"` LastModifyTime int64 `json:"lastmodifytime"` HeadFileSize int64 `json:"headfilesize"` RevisionCounterDisabled bool `json:"revisioncounterdisabled"` UnmapMarkDiskChainRemoved bool `json:"unmapMarkDiskChainRemoved"` SnapshotCountUsage int `json:"snapshotCountUsage"` SnapshotSizeUsage int64 `json:"snapshotSizeUsage"` }
type ReplicaSalvageInfo ¶ added in v1.1.0
type ReplicaState ¶ added in v1.3.3
type ReplicaState string
type Server ¶
type Server interface { ReaderWriterUnmapperAt Controller }
type SyncFileInfo ¶
type UnmapperAt ¶ added in v1.4.0
type VolumeInfo ¶
type VolumeInfo struct { Name string `json:"name"` Size int64 `json:"size"` ReplicaCount int `json:"replicaCount"` Endpoint string `json:"endpoint"` Frontend string `json:"frontend"` FrontendState string `json:"frontendState"` IsExpanding bool `json:"isExpanding"` LastExpansionError string `json:"lastExpansionError"` LastExpansionFailedAt string `json:"lastExpansionFailedAt"` UnmapMarkSnapChainRemoved bool `json:"unmapMarkSnapChainRemoved"` SnapshotMaxCount int `json:"snapshotMaxCount"` SnapshotMaxSize int64 `json:"SnapshotMaxSize"` }
Click to show internal directories.
Click to hide internal directories.