Documentation ¶
Index ¶
- Constants
- func GRPCLogger(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, ...) (interface{}, error)
- func NewMounter(log *logrus.Entry) *mounter
- type FakeInstance
- func (f *FakeInstance) AttachISO(ctx context.Context, instanceID, isoID string) error
- func (f *FakeInstance) AttachPrivateNetwork(ctx context.Context, instanceID, networkID string) error
- func (f *FakeInstance) AttachVPC(ctx context.Context, instanceID, networkID string) error
- func (f *FakeInstance) Create(ctx context.Context, instanceReq *govultr.InstanceCreateReq) (*govultr.Instance, error)
- func (f *FakeInstance) CreateIPv4(ctx context.Context, instanceID string, reboot *bool) (*govultr.IPv4, error)
- func (f *FakeInstance) CreateReverseIPv4(ctx context.Context, instanceID string, reverseReq *govultr.ReverseIP) error
- func (f *FakeInstance) CreateReverseIPv6(ctx context.Context, instanceID string, reverseReq *govultr.ReverseIP) error
- func (f *FakeInstance) DefaultReverseIPv4(ctx context.Context, instanceID, ip string) error
- func (f *FakeInstance) Delete(ctx context.Context, instanceID string) error
- func (f *FakeInstance) DeleteIPv4(ctx context.Context, instanceID, ip string) error
- func (f *FakeInstance) DeleteReverseIPv6(ctx context.Context, instanceID, ip string) error
- func (f *FakeInstance) DetachISO(ctx context.Context, instanceID string) error
- func (f *FakeInstance) DetachPrivateNetwork(ctx context.Context, instanceID, networkID string) error
- func (f *FakeInstance) DetachVPC(ctx context.Context, instanceID, networkID string) error
- func (f *FakeInstance) Get(ctx context.Context, instanceID string) (*govultr.Instance, error)
- func (f *FakeInstance) GetBackupSchedule(ctx context.Context, instanceID string) (*govultr.BackupSchedule, error)
- func (f *FakeInstance) GetBandwidth(ctx context.Context, instanceID string) (*govultr.Bandwidth, error)
- func (f *FakeInstance) GetNeighbors(ctx context.Context, instanceID string) (*govultr.Neighbors, error)
- func (f *FakeInstance) GetUpgrades(ctx context.Context, instanceID string) (*govultr.Upgrades, error)
- func (f *FakeInstance) GetUserData(ctx context.Context, instanceID string) (*govultr.UserData, error)
- func (f *FakeInstance) Halt(ctx context.Context, instanceID string) error
- func (f *FakeInstance) ISOStatus(ctx context.Context, instanceID string) (*govultr.Iso, error)
- func (f *FakeInstance) List(ctx context.Context, options *govultr.ListOptions) ([]govultr.Instance, *govultr.Meta, error)
- func (f *FakeInstance) ListIPv4(ctx context.Context, instanceID string, option *govultr.ListOptions) ([]govultr.IPv4, *govultr.Meta, error)
- func (f *FakeInstance) ListIPv6(ctx context.Context, instanceID string, option *govultr.ListOptions) ([]govultr.IPv6, *govultr.Meta, error)
- func (f *FakeInstance) ListPrivateNetworks(ctx context.Context, instanceID string, options *govultr.ListOptions) ([]govultr.PrivateNetwork, *govultr.Meta, error)
- func (f *FakeInstance) ListReverseIPv6(ctx context.Context, instanceID string) ([]govultr.ReverseIP, error)
- func (f *FakeInstance) ListVPCInfo(ctx context.Context, instanceID string, options *govultr.ListOptions) ([]govultr.VPCInfo, *govultr.Meta, error)
- func (f *FakeInstance) MassHalt(ctx context.Context, instanceList []string) error
- func (f *FakeInstance) MassReboot(ctx context.Context, instanceList []string) error
- func (f *FakeInstance) MassStart(ctx context.Context, instanceList []string) error
- func (f *FakeInstance) Reboot(ctx context.Context, instanceID string) error
- func (f *FakeInstance) Reinstall(ctx context.Context, instanceID string, reinstallReq *govultr.ReinstallReq) (*govultr.Instance, error)
- func (f *FakeInstance) Restore(ctx context.Context, instanceID string, restoreReq *govultr.RestoreReq) error
- func (f *FakeInstance) SetBackupSchedule(ctx context.Context, instanceID string, backup *govultr.BackupScheduleReq) error
- func (f *FakeInstance) Start(ctx context.Context, instanceID string) error
- func (f *FakeInstance) Update(ctx context.Context, instanceID string, instanceReq *govultr.InstanceUpdateReq) (*govultr.Instance, error)
- type Mounter
- type NonBlockingGRPCServer
- type VultrControllerServer
- func (c *VultrControllerServer) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (c *VultrControllerServer) ControllerGetCapabilities(context.Context, *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (c *VultrControllerServer) ControllerGetVolume(ctx context.Context, request *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (c *VultrControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (c *VultrControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (c *VultrControllerServer) CreateSnapshot(context.Context, *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (c *VultrControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (c *VultrControllerServer) DeleteSnapshot(context.Context, *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (c *VultrControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (c *VultrControllerServer) GetCapacity(context.Context, *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (c *VultrControllerServer) ListSnapshots(context.Context, *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (c *VultrControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (c *VultrControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type VultrDriver
- type VultrIdentityServer
- func (vultrIdentity *VultrIdentityServer) GetPluginCapabilities(_ context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (vultrIdentity *VultrIdentityServer) GetPluginInfo(context.Context, *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (vultrIdentity *VultrIdentityServer) Probe(_ context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type VultrNodeServer
- func (n *VultrNodeServer) NodeExpandVolume(context.Context, *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (n *VultrNodeServer) NodeGetCapabilities(context.Context, *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (n *VultrNodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (n *VultrNodeServer) NodeGetVolumeStats(context.Context, *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (n *VultrNodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (n *VultrNodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (n *VultrNodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (n *VultrNodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
Constants ¶
View Source
const (
DefaultDriverName = "block.csi.vultr.com"
)
Variables ¶
This section is empty.
Functions ¶
func GRPCLogger ¶
func GRPCLogger(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)
GRPCLogger provides better error handling for gRPC calls
func NewMounter ¶
Types ¶
type FakeInstance ¶
type FakeInstance struct {
// contains filtered or unexported fields
}
func (*FakeInstance) AttachISO ¶
func (f *FakeInstance) AttachISO(ctx context.Context, instanceID, isoID string) error
func (*FakeInstance) AttachPrivateNetwork ¶
func (f *FakeInstance) AttachPrivateNetwork(ctx context.Context, instanceID, networkID string) error
func (*FakeInstance) AttachVPC ¶
func (f *FakeInstance) AttachVPC(ctx context.Context, instanceID, networkID string) error
func (*FakeInstance) Create ¶
func (f *FakeInstance) Create(ctx context.Context, instanceReq *govultr.InstanceCreateReq) (*govultr.Instance, error)
func (*FakeInstance) CreateIPv4 ¶
func (*FakeInstance) CreateReverseIPv4 ¶
func (f *FakeInstance) CreateReverseIPv4(ctx context.Context, instanceID string, reverseReq *govultr.ReverseIP) error
func (*FakeInstance) CreateReverseIPv6 ¶
func (f *FakeInstance) CreateReverseIPv6(ctx context.Context, instanceID string, reverseReq *govultr.ReverseIP) error
func (*FakeInstance) DefaultReverseIPv4 ¶
func (f *FakeInstance) DefaultReverseIPv4(ctx context.Context, instanceID, ip string) error
func (*FakeInstance) Delete ¶
func (f *FakeInstance) Delete(ctx context.Context, instanceID string) error
func (*FakeInstance) DeleteIPv4 ¶
func (f *FakeInstance) DeleteIPv4(ctx context.Context, instanceID, ip string) error
func (*FakeInstance) DeleteReverseIPv6 ¶
func (f *FakeInstance) DeleteReverseIPv6(ctx context.Context, instanceID, ip string) error
func (*FakeInstance) DetachISO ¶
func (f *FakeInstance) DetachISO(ctx context.Context, instanceID string) error
func (*FakeInstance) DetachPrivateNetwork ¶
func (f *FakeInstance) DetachPrivateNetwork(ctx context.Context, instanceID, networkID string) error
func (*FakeInstance) DetachVPC ¶
func (f *FakeInstance) DetachVPC(ctx context.Context, instanceID, networkID string) error
func (*FakeInstance) Get ¶
func (f *FakeInstance) Get(ctx context.Context, instanceID string) (*govultr.Instance, error)
func (*FakeInstance) GetBackupSchedule ¶
func (f *FakeInstance) GetBackupSchedule(ctx context.Context, instanceID string) (*govultr.BackupSchedule, error)
func (*FakeInstance) GetBandwidth ¶
func (f *FakeInstance) GetBandwidth(ctx context.Context, instanceID string) (*govultr.Bandwidth, error)
func (*FakeInstance) GetNeighbors ¶
func (f *FakeInstance) GetNeighbors(ctx context.Context, instanceID string) (*govultr.Neighbors, error)
func (*FakeInstance) GetUpgrades ¶
func (f *FakeInstance) GetUpgrades(ctx context.Context, instanceID string) (*govultr.Upgrades, error)
func (*FakeInstance) GetUserData ¶
func (f *FakeInstance) GetUserData(ctx context.Context, instanceID string) (*govultr.UserData, error)
func (*FakeInstance) Halt ¶
func (f *FakeInstance) Halt(ctx context.Context, instanceID string) error
func (*FakeInstance) ISOStatus ¶
func (f *FakeInstance) ISOStatus(ctx context.Context, instanceID string) (*govultr.Iso, error)
func (*FakeInstance) List ¶
func (f *FakeInstance) List(ctx context.Context, options *govultr.ListOptions) ([]govultr.Instance, *govultr.Meta, error)
func (*FakeInstance) ListIPv4 ¶
func (f *FakeInstance) ListIPv4(ctx context.Context, instanceID string, option *govultr.ListOptions) ([]govultr.IPv4, *govultr.Meta, error)
func (*FakeInstance) ListIPv6 ¶
func (f *FakeInstance) ListIPv6(ctx context.Context, instanceID string, option *govultr.ListOptions) ([]govultr.IPv6, *govultr.Meta, error)
func (*FakeInstance) ListPrivateNetworks ¶
func (f *FakeInstance) ListPrivateNetworks(ctx context.Context, instanceID string, options *govultr.ListOptions) ([]govultr.PrivateNetwork, *govultr.Meta, error)
func (*FakeInstance) ListReverseIPv6 ¶
func (f *FakeInstance) ListReverseIPv6(ctx context.Context, instanceID string) ([]govultr.ReverseIP, error)
func (*FakeInstance) ListVPCInfo ¶
func (f *FakeInstance) ListVPCInfo(ctx context.Context, instanceID string, options *govultr.ListOptions) ([]govultr.VPCInfo, *govultr.Meta, error)
func (*FakeInstance) MassHalt ¶
func (f *FakeInstance) MassHalt(ctx context.Context, instanceList []string) error
func (*FakeInstance) MassReboot ¶
func (f *FakeInstance) MassReboot(ctx context.Context, instanceList []string) error
func (*FakeInstance) MassStart ¶
func (f *FakeInstance) MassStart(ctx context.Context, instanceList []string) error
func (*FakeInstance) Reboot ¶
func (f *FakeInstance) Reboot(ctx context.Context, instanceID string) error
func (*FakeInstance) Reinstall ¶
func (f *FakeInstance) Reinstall(ctx context.Context, instanceID string, reinstallReq *govultr.ReinstallReq) (*govultr.Instance, error)
func (*FakeInstance) Restore ¶
func (f *FakeInstance) Restore(ctx context.Context, instanceID string, restoreReq *govultr.RestoreReq) error
func (*FakeInstance) SetBackupSchedule ¶
func (f *FakeInstance) SetBackupSchedule(ctx context.Context, instanceID string, backup *govultr.BackupScheduleReq) error
type NonBlockingGRPCServer ¶
type NonBlockingGRPCServer interface { // Start services at the endpoint Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) // Waits for the service to stop Wait() // Stops the service gracefully Stop() // Stops the service forcefully ForceStop() }
Defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer() NonBlockingGRPCServer
type VultrControllerServer ¶
type VultrControllerServer struct {
Driver *VultrDriver
}
func NewVultrControllerServer ¶
func NewVultrControllerServer(driver *VultrDriver) *VultrControllerServer
func (*VultrControllerServer) ControllerExpandVolume ¶
func (c *VultrControllerServer) ControllerExpandVolume(context.Context, *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (*VultrControllerServer) ControllerGetCapabilities ¶
func (c *VultrControllerServer) ControllerGetCapabilities(context.Context, *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities get capabilities of the controller
func (*VultrControllerServer) ControllerGetVolume ¶
func (c *VultrControllerServer) ControllerGetVolume(ctx context.Context, request *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume This relates to being able to get health checks on a PV. We do not have this
func (*VultrControllerServer) ControllerPublishVolume ¶
func (c *VultrControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
func (*VultrControllerServer) ControllerUnpublishVolume ¶
func (c *VultrControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
func (*VultrControllerServer) CreateSnapshot ¶
func (c *VultrControllerServer) CreateSnapshot(context.Context, *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*VultrControllerServer) CreateVolume ¶
func (c *VultrControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume provisions a new volume on behalf of the user
func (*VultrControllerServer) DeleteSnapshot ¶
func (c *VultrControllerServer) DeleteSnapshot(context.Context, *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*VultrControllerServer) DeleteVolume ¶
func (c *VultrControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
func (*VultrControllerServer) GetCapacity ¶
func (c *VultrControllerServer) GetCapacity(context.Context, *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*VultrControllerServer) ListSnapshots ¶
func (c *VultrControllerServer) ListSnapshots(context.Context, *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*VultrControllerServer) ListVolumes ¶
func (c *VultrControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
func (*VultrControllerServer) ValidateVolumeCapabilities ¶
func (c *VultrControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities checks if requested capabilities are supported
type VultrDriver ¶
type VultrDriver struct {
// contains filtered or unexported fields
}
VultrDriver struct
func NewDriver ¶
func NewDriver(endpoint, token, driverName, version, userAgent, apiURL string) (*VultrDriver, error)
func (*VultrDriver) Run ¶
func (d *VultrDriver) Run()
type VultrIdentityServer ¶
type VultrIdentityServer struct {
Driver *VultrDriver
}
VultrIdentityServer
func NewVultrIdentityServer ¶
func NewVultrIdentityServer(driver *VultrDriver) *VultrIdentityServer
func (*VultrIdentityServer) GetPluginCapabilities ¶
func (vultrIdentity *VultrIdentityServer) GetPluginCapabilities(_ context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns plugins available capabilities
func (*VultrIdentityServer) GetPluginInfo ¶
func (vultrIdentity *VultrIdentityServer) GetPluginInfo(context.Context, *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo returns basic plugin data
func (*VultrIdentityServer) Probe ¶
func (vultrIdentity *VultrIdentityServer) Probe(_ context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
type VultrNodeServer ¶
type VultrNodeServer struct {
Driver *VultrDriver
}
func NewVultrNodeDriver ¶
func NewVultrNodeDriver(driver *VultrDriver) *VultrNodeServer
func (*VultrNodeServer) NodeExpandVolume ¶
func (n *VultrNodeServer) NodeExpandVolume(context.Context, *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*VultrNodeServer) NodeGetCapabilities ¶
func (n *VultrNodeServer) NodeGetCapabilities(context.Context, *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*VultrNodeServer) NodeGetInfo ¶
func (n *VultrNodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (*VultrNodeServer) NodeGetVolumeStats ¶
func (n *VultrNodeServer) NodeGetVolumeStats(context.Context, *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (*VultrNodeServer) NodePublishVolume ¶
func (n *VultrNodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*VultrNodeServer) NodeStageVolume ¶
func (n *VultrNodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
func (*VultrNodeServer) NodeUnpublishVolume ¶
func (n *VultrNodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*VultrNodeServer) NodeUnstageVolume ¶
func (n *VultrNodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
Click to show internal directories.
Click to hide internal directories.