Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MetricDriver ¶
type MetricDriver interface { //Any initialization the metric driver does while starting. Setup() error //Any operation the metric driver does while stopping. Teardown() error CollectMetrics(metricList []string, instanceID string) ([]*model.MetricSpec, error) ValidateMetricsSupportList(metricList []string, resourceType string) ([]string, error) }
type ReplicationDriver ¶
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 ¶
func CleanReplicationDriver(d ReplicationDriver) ReplicationDriver
Clean
func InitReplicationDriver ¶
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.
Click to show internal directories.
Click to hide internal directories.