Documentation ¶
Index ¶
- Constants
- Variables
- func NewControllerService(client *ah.APIClient, clusterID string) *controllerService
- func NewNodeService(client *ah.APIClient) (*nodeService, error)
- type Driver
- func (c Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (c Driver) ControllerGetCapabilities(cxt context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (c Driver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (c Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (c Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (c Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (c Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (c Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (c Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (c Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (d *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (c Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (c Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (n Driver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (n Driver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (n Driver) NodeGetInfo(context.Context, *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (n Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (n Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (n Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (n Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (n Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- func (d *Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- func (d *Driver) Run() error
- func (c Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type DriverOptions
- type LinuxMounter
- func (m *LinuxMounter) BlockSize(path string) (int64, error)
- func (m *LinuxMounter) BytesFSMetrics(path string) (available, total, used int64, err error)
- func (m *LinuxMounter) CreateDir(path string) error
- func (m *LinuxMounter) CreateFile(path string) error
- func (m *LinuxMounter) DeviceNameFromMount(mountPath string) (string, error)
- func (m *LinuxMounter) DevicePath(volumeNumber string) (string, error)
- func (m *LinuxMounter) FormatAndMount(source, target, fsType string, options []string) error
- func (m *LinuxMounter) INodeFSMetrics(path string) (available, total, used int64, err error)
- func (m *LinuxMounter) IsBlockDevice(path string) (bool, error)
- func (m *LinuxMounter) IsDeviceMountedToTarget(devicePath, targetPath string) (bool, error)
- func (m *LinuxMounter) IsPathExists(path string) (bool, error)
- func (m *LinuxMounter) Mount(source, target, fsType string, options []string) error
- func (m *LinuxMounter) Resize(devicePath, deviceMountPath string) error
- func (m *LinuxMounter) Unmount(target string) error
- type Mounter
Constants ¶
View Source
const ( GiB = 1 << (10 * 3) MinVolumeSize = 1 * GiB DefaultVolumeSize = MinVolumeSize VolumeProductSlugKey = "product-slug" )
View Source
const ( DriverName = "csi.advancedhosting.com" DriverVersion = "1.0.0" TopologySegmentDatacenter = DriverName + "/datacenter" ControllerMode = "controller" NodeMode = "node" )
View Source
const ( DefaultFSType = "ext4" MaxVolumesPerNode = 8 InstancePath = "/var/lib/cloud/instance" )
Variables ¶
View Source
var (
ErrTimeout = errors.New("timeout was exceeded while waiting expected state")
)
Functions ¶
func NewControllerService ¶
func NewNodeService ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements the csi driver according the spec
func NewDriver ¶
func NewDriver(options *DriverOptions) (*Driver, error)
func (Driver) ControllerExpandVolume ¶
func (c Driver) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (Driver) ControllerGetCapabilities ¶
func (c Driver) ControllerGetCapabilities(cxt context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
func (Driver) ControllerGetVolume ¶
func (c Driver) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
func (Driver) ControllerPublishVolume ¶
func (c Driver) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (Driver) ControllerUnpublishVolume ¶
func (c Driver) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (Driver) CreateSnapshot ¶
func (c Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (Driver) CreateVolume ¶
func (c Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
func (Driver) DeleteSnapshot ¶
func (c Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (Driver) DeleteVolume ¶
func (c Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (Driver) GetCapacity ¶
func (c Driver) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*Driver) GetPluginCapabilities ¶
func (d *Driver) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns capabilities of the plugin
func (*Driver) GetPluginInfo ¶
func (d *Driver) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo returns metadata
func (Driver) ListSnapshots ¶
func (c Driver) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (Driver) ListVolumes ¶
func (c Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (Driver) NodeExpandVolume ¶
func (n Driver) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (Driver) NodeGetCapabilities ¶
func (n Driver) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (Driver) NodeGetInfo ¶
func (n Driver) NodeGetInfo(context.Context, *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (Driver) NodeGetVolumeStats ¶
func (n Driver) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (Driver) NodePublishVolume ¶
func (n Driver) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (Driver) NodeStageVolume ¶
func (n Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
func (Driver) NodeUnpublishVolume ¶
func (n Driver) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (Driver) NodeUnstageVolume ¶
func (n Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
func (*Driver) Probe ¶
func (d *Driver) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe checks driver
func (Driver) ValidateVolumeCapabilities ¶
func (c Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
type DriverOptions ¶
type LinuxMounter ¶
type LinuxMounter struct {
// contains filtered or unexported fields
}
func NewLinuxMounter ¶
func NewLinuxMounter() *LinuxMounter
func (*LinuxMounter) BytesFSMetrics ¶
func (m *LinuxMounter) BytesFSMetrics(path string) (available, total, used int64, err error)
func (*LinuxMounter) CreateDir ¶
func (m *LinuxMounter) CreateDir(path string) error
func (*LinuxMounter) CreateFile ¶
func (m *LinuxMounter) CreateFile(path string) error
func (*LinuxMounter) DeviceNameFromMount ¶
func (m *LinuxMounter) DeviceNameFromMount(mountPath string) (string, error)
func (*LinuxMounter) DevicePath ¶
func (m *LinuxMounter) DevicePath(volumeNumber string) (string, error)
func (*LinuxMounter) FormatAndMount ¶
func (m *LinuxMounter) FormatAndMount(source, target, fsType string, options []string) error
func (*LinuxMounter) INodeFSMetrics ¶
func (m *LinuxMounter) INodeFSMetrics(path string) (available, total, used int64, err error)
func (*LinuxMounter) IsBlockDevice ¶
func (m *LinuxMounter) IsBlockDevice(path string) (bool, error)
func (*LinuxMounter) IsDeviceMountedToTarget ¶
func (m *LinuxMounter) IsDeviceMountedToTarget(devicePath, targetPath string) (bool, error)
func (*LinuxMounter) IsPathExists ¶
func (m *LinuxMounter) IsPathExists(path string) (bool, error)
func (*LinuxMounter) Mount ¶
func (m *LinuxMounter) Mount(source, target, fsType string, options []string) error
func (*LinuxMounter) Resize ¶
func (m *LinuxMounter) Resize(devicePath, deviceMountPath string) error
func (*LinuxMounter) Unmount ¶
func (m *LinuxMounter) Unmount(target string) error
type Mounter ¶
type Mounter interface { DevicePath(string) (string, error) IsPathExists(string) (bool, error) FormatAndMount(string, string, string, []string) error Mount(string, string, string, []string) error Unmount(string) error CreateDir(string) error CreateFile(string) error DeviceNameFromMount(string) (string, error) IsDeviceMountedToTarget(string, string) (bool, error) IsBlockDevice(string) (bool, error) BlockSize(string) (int64, error) BytesFSMetrics(string) (int64, int64, int64, error) INodeFSMetrics(string) (int64, int64, int64, error) Resize(string, string) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.