Documentation ¶
Index ¶
- Constants
- Variables
- func DetermineEngineReplicaTimeout(timeout time.Duration) time.Duration
- func DetermineIscsiTargetRequestTimeout(engineReplicaTimeout time.Duration) time.Duration
- func GetReplicaDisksAndHead(address, volumeName, instanceName string) (map[string]types.DiskInfo, string, error)
- func NewFrontend(frontendType string, iscsiTargetRequestTimeout time.Duration) (types.Frontend, error)
- type BackendError
- type Controller
- func (c *Controller) AddReplica(address string, snapshotRequired bool, mode types.Mode) error
- func (c *Controller) Close() error
- func (c *Controller) Endpoint() string
- func (c *Controller) Expand(size int64) error
- func (c *Controller) Frontend() string
- func (c *Controller) FrontendState() string
- func (c *Controller) GetExpansionErrorInfo() (string, string)
- func (c *Controller) GetLatestMetics() *enginerpc.Metrics
- func (c *Controller) GetSnapshotMaxCount() int
- func (c *Controller) GetSnapshotMaxSize() int64
- func (c *Controller) GetUnmapMarkSnapChainRemoved() bool
- func (c *Controller) IsExpanding() bool
- func (c *Controller) ListReplicas() []types.Replica
- func (c *Controller) PrepareRebuildReplica(address, instanceName string) ([]types.SyncFileInfo, error)
- func (c *Controller) ReadAt(b []byte, off int64) (int, error)
- func (c *Controller) RemoveReplica(address string) error
- func (c *Controller) Revert(name string) error
- func (c *Controller) SetReplicaMode(address string, mode types.Mode) error
- func (c *Controller) SetSnapshotMaxCount(count int) error
- func (c *Controller) SetSnapshotMaxSize(size int64) error
- func (c *Controller) SetUnmapMarkSnapChainRemoved(enabled bool) error
- func (c *Controller) Shutdown() error
- func (c *Controller) ShutdownFrontend() error
- func (c *Controller) Size() int64
- func (c *Controller) Snapshot(inputName string, labels map[string]string, shouldFreeze bool) (name string, err error)
- func (c *Controller) Start(volumeSize, volumeCurrentSize int64, addresses ...string) error
- func (c *Controller) StartFrontend(frontend string) error
- func (c *Controller) StartGRPCServer() error
- func (c *Controller) UnmapAt(length uint32, off int64) (int, error)
- func (c *Controller) VerifyRebuildReplica(address, instanceName string) error
- func (c *Controller) WaitForShutdown() error
- func (c *Controller) WriteAt(b []byte, off int64) (int, error)
- type MultiUnmapperAt
- type MultiUnmapperError
- type MultiWriterAt
- type MultiWriterError
Constants ¶
View Source
const ( ControllerErrorNoBackendReplicaError = "no available backend due to replica error" )
View Source
const (
DefaultEngineReplicaTimeout = 8 * time.Second
)
Variables ¶
View Source
var (
ErrNoBackend = errors.New("no backend available")
)
Functions ¶
func DetermineEngineReplicaTimeout ¶ added in v1.4.0
func DetermineIscsiTargetRequestTimeout ¶ added in v1.4.0
func GetReplicaDisksAndHead ¶ added in v1.2.5
Types ¶
type BackendError ¶
func (*BackendError) Error ¶
func (b *BackendError) Error() string
type Controller ¶
type Controller struct { sync.RWMutex VolumeName string DataServerProtocol types.DataServerProtocol SnapshotMaxSize int64 GRPCAddress string GRPCServer *grpc.Server ShutdownWG sync.WaitGroup // contains filtered or unexported fields }
func NewController ¶
func NewController(name string, factory types.BackendFactory, frontend types.Frontend, isUpgrade, disableRevCounter, salvageRequested, unmapMarkSnapChainRemoved bool, iscsiTargetRequestTimeout, engineReplicaTimeoutShort, engineReplicaTimeoutLong time.Duration, dataServerProtocol types.DataServerProtocol, fileSyncHTTPClientTimeout, snapshotMaxCount int, snapshotMaxSize int64) *Controller
func (*Controller) AddReplica ¶
func (*Controller) Close ¶
func (c *Controller) Close() error
func (*Controller) Endpoint ¶
func (c *Controller) Endpoint() string
func (*Controller) Expand ¶
func (c *Controller) Expand(size int64) error
func (*Controller) Frontend ¶
func (c *Controller) Frontend() string
func (*Controller) FrontendState ¶
func (c *Controller) FrontendState() string
func (*Controller) GetExpansionErrorInfo ¶ added in v0.8.1
func (c *Controller) GetExpansionErrorInfo() (string, string)
func (*Controller) GetLatestMetics ¶
func (c *Controller) GetLatestMetics() *enginerpc.Metrics
func (*Controller) GetSnapshotMaxCount ¶ added in v1.6.0
func (c *Controller) GetSnapshotMaxCount() int
func (*Controller) GetSnapshotMaxSize ¶ added in v1.6.0
func (c *Controller) GetSnapshotMaxSize() int64
func (*Controller) GetUnmapMarkSnapChainRemoved ¶ added in v1.4.0
func (c *Controller) GetUnmapMarkSnapChainRemoved() bool
func (*Controller) IsExpanding ¶
func (c *Controller) IsExpanding() bool
func (*Controller) ListReplicas ¶
func (c *Controller) ListReplicas() []types.Replica
func (*Controller) PrepareRebuildReplica ¶
func (c *Controller) PrepareRebuildReplica(address, instanceName string) ([]types.SyncFileInfo, error)
func (*Controller) RemoveReplica ¶
func (c *Controller) RemoveReplica(address string) error
func (*Controller) Revert ¶
func (c *Controller) Revert(name string) error
func (*Controller) SetReplicaMode ¶
func (c *Controller) SetReplicaMode(address string, mode types.Mode) error
func (*Controller) SetSnapshotMaxCount ¶ added in v1.6.0
func (c *Controller) SetSnapshotMaxCount(count int) error
func (*Controller) SetSnapshotMaxSize ¶ added in v1.6.0
func (c *Controller) SetSnapshotMaxSize(size int64) error
func (*Controller) SetUnmapMarkSnapChainRemoved ¶ added in v1.4.0
func (c *Controller) SetUnmapMarkSnapChainRemoved(enabled bool) error
func (*Controller) Shutdown ¶
func (c *Controller) Shutdown() error
func (*Controller) ShutdownFrontend ¶
func (c *Controller) ShutdownFrontend() error
func (*Controller) Size ¶
func (c *Controller) Size() int64
func (*Controller) Snapshot ¶
func (c *Controller) Snapshot(inputName string, labels map[string]string, shouldFreeze bool) (name string, err error)
If shouldFreeze, Snapshot attempts to freeze the mounted filesystem on the volume's root partition. If it fails to do so, Snapshot attempts to clean up and returns an error. If not shouldFreeze or if a mounted filesystem is not detected on the volume's root partition, Snapshot does a best effort sync and takes a snapshot.
func (*Controller) Start ¶
func (c *Controller) Start(volumeSize, volumeCurrentSize int64, addresses ...string) error
func (*Controller) StartFrontend ¶
func (c *Controller) StartFrontend(frontend string) error
func (*Controller) StartGRPCServer ¶
func (c *Controller) StartGRPCServer() error
func (*Controller) UnmapAt ¶ added in v1.4.0
func (c *Controller) UnmapAt(length uint32, off int64) (int, error)
func (*Controller) VerifyRebuildReplica ¶
func (c *Controller) VerifyRebuildReplica(address, instanceName string) error
func (*Controller) WaitForShutdown ¶
func (c *Controller) WaitForShutdown() error
type MultiUnmapperAt ¶ added in v1.4.0
type MultiUnmapperAt struct {
// contains filtered or unexported fields
}
type MultiUnmapperError ¶ added in v1.4.0
type MultiUnmapperError struct {
// contains filtered or unexported fields
}
func (*MultiUnmapperError) Error ¶ added in v1.4.0
func (m *MultiUnmapperError) Error() string
type MultiWriterAt ¶
type MultiWriterAt struct {
// contains filtered or unexported fields
}
type MultiWriterError ¶
func (*MultiWriterError) Error ¶
func (m *MultiWriterError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.