Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MetricDriver ¶ added in v0.5.2
type MetricDriver interface { //Any initialization the metric driver does while starting. Setup() error //Any operation the metric driver does while stopping. Teardown() error // Collect metrics for all supported resources CollectMetrics() ([]*model.MetricSpec, error) }
func CleanMetricDriver ¶ added in v0.5.3
func CleanMetricDriver(d MetricDriver) MetricDriver
func InitMetricDriver ¶ added in v0.5.2
func InitMetricDriver(resourceType string) MetricDriver
Init
type ReplicationDriver ¶ added in v0.1.8
type ReplicationDriver interface { // Any initialization the replication driver does while starting. Setup() error // Any operation the replication driver does while stopping. Unset() error CreateReplication(opt *pb.CreateReplicationOpts) (*model.ReplicationSpec, error) DeleteReplication(opt *pb.DeleteReplicationOpts) error EnableReplication(opt *pb.EnableReplicationOpts) error DisableReplication(opt *pb.DisableReplicationOpts) error FailoverReplication(opt *pb.FailoverReplicationOpts) error }
ReplicationDriver is an interface for exposing some operations of different replication drivers, currently supporting DRBD.
func CleanReplicationDriver ¶ added in v0.1.8
func CleanReplicationDriver(d ReplicationDriver) ReplicationDriver
Clean
func InitReplicationDriver ¶ added in v0.1.8
func InitReplicationDriver(resourceType string) (ReplicationDriver, error)
Init
type VolumeDriver ¶
type VolumeDriver interface { //Any initialization the volume driver does while starting. Setup() error //Any operation the volume driver does while stopping. Unset() error CreateVolume(opt *pb.CreateVolumeOpts) (*model.VolumeSpec, error) PullVolume(volIdentifier string) (*model.VolumeSpec, error) DeleteVolume(opt *pb.DeleteVolumeOpts) error ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error) PullSnapshot(snapIdentifier string) (*model.VolumeSnapshotSpec, error) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error // NOTE Parameter vg means complete volume group information, because driver // may use it to do something and return volume group status. CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error) // NOTE Parameter addVolumesRef or removeVolumesRef means complete volume // information that will be added or removed from group. Driver may use // them to do some related operations and return their status. UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error) // NOTE Parameter volumes means volumes deleted from group, driver may use // their compelete information to do some related operations and return // their status. DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error ListPools() ([]*model.StoragePoolSpec, error) }
VolumeDriver is an interface for exposing some operations of different volume drivers, currently support sample, lvm, ceph, cinder and so forth.
Source Files
¶
- drivers.go
- replication_drivers.go
Click to show internal directories.
Click to hide internal directories.