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 DiffDisk
- type DiskInfo
- type Error
- type ErrorCode
- type Frontend
- type Metrics
- type Mode
- type MonitorChannel
- type PrepareRemoveAction
- type ProcessState
- type RWMetrics
- type ReaderWriterAt
- type Replica
- type ReplicaInfo
- type Server
- type State
- type SyncFileInfo
- 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" HTTPSProxy = "HTTPS_PROXY" HTTPProxy = "HTTP_PROXY" NOProxy = "NO_PROXY" RetryCounts = 30 RetryInterval = 1 * time.Second EngineFrontendBlockDev = "tgt-blockdev" EngineFrontendISCSI = "tgt-iscsi" )
View Source
const ( EventTypeVolume = "volume" EventTypeReplica = "replica" EventTypeMetrics = "metrics" )
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 { ReaderWriterAt io.Closer Snapshot(name string, userCreated bool, created string, labels map[string]string) error Expand(size int64) error Size() (int64, error) SectorSize() (int64, error) RemainSnapshots() (int, error) GetRevisionCounter() (int64, error) SetRevisionCounter(counter int64) error GetMonitorChannel() MonitorChannel StopMonitoring() }
type BackendFactory ¶
type Controller ¶
type ControllerReplicaInfo ¶
type DataProcessor ¶
type DataProcessor interface { ReaderWriterAt PingResponse() error }
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 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"` }
type Server ¶
type Server interface { ReaderWriterAt Controller }
type SyncFileInfo ¶
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"` }
Click to show internal directories.
Click to hide internal directories.