driver

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

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

func NewMounter(log *logrus.Entry) *mounter

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 (f *FakeInstance) CreateIPv4(ctx context.Context, instanceID string, reboot *bool) (*govultr.IPv4, error)

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

func (*FakeInstance) Start

func (f *FakeInstance) Start(ctx context.Context, instanceID string) error

func (*FakeInstance) Update

func (f *FakeInstance) Update(ctx context.Context, instanceID string, instanceReq *govultr.InstanceUpdateReq) (*govultr.Instance, error)

type Mounter

type Mounter interface {
	Format(source, fs string) error
	IsFormatted(source string) (bool, error)
	Mount(source, target, fs string, opts ...string) error
	IsMounted(target string) (bool, error)
	UnMount(target string) 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) ControllerGetCapabilities

ControllerGetCapabilities get capabilities of the controller

func (*VultrControllerServer) ControllerGetVolume

ControllerGetVolume This relates to being able to get health checks on a PV. We do not have this

func (*VultrControllerServer) ControllerPublishVolume

func (*VultrControllerServer) ControllerUnpublishVolume

func (*VultrControllerServer) CreateSnapshot

func (*VultrControllerServer) CreateVolume

CreateVolume provisions a new volume on behalf of the user

func (*VultrControllerServer) DeleteSnapshot

func (*VultrControllerServer) DeleteVolume

func (*VultrControllerServer) GetCapacity

func (*VultrControllerServer) ListSnapshots

func (*VultrControllerServer) ListVolumes

func (*VultrControllerServer) ValidateVolumeCapabilities

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

GetPluginCapabilities returns plugins available capabilities

func (*VultrIdentityServer) GetPluginInfo

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) NodeGetInfo

func (*VultrNodeServer) NodePublishVolume

func (*VultrNodeServer) NodeStageVolume

func (*VultrNodeServer) NodeUnpublishVolume

func (*VultrNodeServer) NodeUnstageVolume

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL