Documentation
¶
Index ¶
- Variables
- func IsSnapShotExist(snapName string, addr string) (bool, error)
- type BackendError
- type BuildOpts
- type Controller
- func (c *Controller) AddQuorumReplica(address string) error
- func (c *Controller) AddReplica(address string) error
- func (c *Controller) Close() error
- func (c *Controller) DeleteSnapshot(replicas []types.Replica) error
- func (c *Controller) GetSize() int64
- func (c *Controller) IsReplicaRW(replicaInController *types.Replica) error
- func (c *Controller) ListQuorumReplicas() []types.Replica
- func (c *Controller) ListReplicas() []types.Replica
- func (c *Controller) PrepareRebuildReplica(address string) ([]string, error)
- func (c *Controller) ReadAt(b []byte, off int64) (int, error)
- func (c *Controller) RegisterReplica(register types.RegReplica) error
- func (c *Controller) RemoveReplica(address string) error
- func (c *Controller) RemoveReplicaNoLock(address string) error
- func (c *Controller) Resize(name string, size string) error
- func (c *Controller) Revert(name string) error
- func (c *Controller) SetReplicaMode(address string, mode types.Mode) error
- func (c *Controller) Shutdown() error
- func (c *Controller) Size() (int64, error)
- func (c *Controller) Snapshot(name string) (string, error)
- func (c *Controller) Start(addresses ...string) error
- func (c *Controller) Stats() (types.Stats, error)
- func (c *Controller) Sync() (int, error)
- func (c *Controller) Unmap(offset int64, length int64) (int, error)
- func (c *Controller) UpdateVolStatus()
- func (c *Controller) VerifyRebuildReplica(address string) error
- func (c *Controller) WriteAt(b []byte, off int64) (int, error)
- type MultiWriterAt
- type MultiWriterError
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoBackend = errors.New("No backend available")
)
Functions ¶
Types ¶
type BackendError ¶
func (*BackendError) Error ¶
func (b *BackendError) Error() string
type BuildOpts ¶
type BuildOpts func(*Controller)
BuildOpts is used for passing various args to NewController
func WithBackend ¶
func WithBackend(factory types.BackendFactory) BuildOpts
WithBackend initialize backend for controller (remote R/W)
func WithFrontend ¶
WithFrontend initialize frontend(gotgt) for controller
type Controller ¶
type Controller struct { sync.RWMutex Name string ReplicationFactor int RegisteredReplicas map[string]types.RegReplica RegisteredQuorumReplicas map[string]types.RegReplica MaxRevReplica string StartTime time.Time StartSignalled bool ReadOnly bool SnapshotName string IsSnapDeletionInProgress bool // contains filtered or unexported fields }
func NewController ¶
func NewController(opts ...BuildOpts) *Controller
NewController instantiates a new Controller
func (*Controller) AddQuorumReplica ¶
func (c *Controller) AddQuorumReplica(address string) error
func (*Controller) AddReplica ¶
func (c *Controller) AddReplica(address string) error
func (*Controller) Close ¶
func (c *Controller) Close() error
func (*Controller) DeleteSnapshot ¶
func (c *Controller) DeleteSnapshot(replicas []types.Replica) error
DeleteSnapshot ...
func (*Controller) GetSize ¶
func (c *Controller) GetSize() int64
func (*Controller) IsReplicaRW ¶
func (c *Controller) IsReplicaRW(replicaInController *types.Replica) error
func (*Controller) ListQuorumReplicas ¶
func (c *Controller) ListQuorumReplicas() []types.Replica
func (*Controller) ListReplicas ¶
func (c *Controller) ListReplicas() []types.Replica
func (*Controller) PrepareRebuildReplica ¶
func (c *Controller) PrepareRebuildReplica(address string) ([]string, error)
func (*Controller) RegisterReplica ¶
func (c *Controller) RegisterReplica(register types.RegReplica) error
func (*Controller) RemoveReplica ¶
func (c *Controller) RemoveReplica(address string) error
func (*Controller) RemoveReplicaNoLock ¶
func (c *Controller) RemoveReplicaNoLock(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) Shutdown ¶
func (c *Controller) Shutdown() error
func (*Controller) Size ¶
func (c *Controller) Size() (int64, error)
func (*Controller) Start ¶
func (c *Controller) Start(addresses ...string) error
func (*Controller) Sync ¶
func (c *Controller) Sync() (int, error)
func (*Controller) UpdateVolStatus ¶
func (c *Controller) UpdateVolStatus()
func (*Controller) VerifyRebuildReplica ¶
func (c *Controller) VerifyRebuildReplica(address string) error
func (*Controller) WriteAt ¶
func (c *Controller) WriteAt(b []byte, off int64) (int, error)
WriteAt is the interface which can be used to write data to jiva volumes Delaying error response by 1 second when volume is in read only state, this will avoid the iscsi disk at client side to go in read only mode even when IOs are not being served. Above approach can hold the the app only for small amount of time based on the app.
type MultiWriterAt ¶
type MultiWriterAt struct {
// contains filtered or unexported fields
}
func (*MultiWriterAt) Sync ¶
func (m *MultiWriterAt) Sync() (int, error)
type MultiWriterError ¶
type MultiWriterError struct { Writers []Writer Updaters []Writer ReplicaErrors []error QuorumErrors []error }
func (*MultiWriterError) Error ¶
func (m *MultiWriterError) Error() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.