ebs

package
v0.0.0-...-7dfd596 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BLOCKVOLUMEPREFIX block volume mount prefix
	BLOCKVOLUMEPREFIX = filepath.Join("/var/lib/kubelet", "/plugins/kubernetes.io/csi/volumeDevices/publish")
)

Functions

This section is empty.

Types

type Cloud

type Cloud interface {
	CreateVolume(ctx context.Context, name, volumeType, zoneId, snapshotId string, capacity int64) (id string, err error)
	ExtendVolume(ctx context.Context, id string, newSize int64) (err error)
	DeleteVolume(ctx context.Context, id string) error
	DevicePathByVolId(volId string) string
	AttachVolume(ctx context.Context, nodeId, volId string) error
	DetachVolume(ctx context.Context, nodeId, volId string) error
	NodeById(ctx context.Context, id string) (*types.InstanceForDescribeInstancesOutput, error)
	DescribeInstanceTypes(ctx context.Context, typeName string) (*types.InstanceTypeForDescribeInstanceTypesOutput, error)
	VolumeById(ctx context.Context, id string) (vol *types.Volume, err error)
	VolumeByName(ctx context.Context, name string) (vol *types.Volume, err error)
	CreateSnapshot(ctx context.Context, volumeID, snapshotName string) (snapshot *types.Snapshot, err error)
	DeleteSnapshot(ctx context.Context, snapshotID string) error
	GetSnapshotByName(ctx context.Context, name string) (snapshot *types.Snapshot, err error)
	GetSnapshotByID(ctx context.Context, snapshotID string) (snapshot *types.Snapshot, err error)
	Region() string
	Zone() string
	Topology() map[string]string
}

type ControllerSvc

type ControllerSvc struct {
	// contains filtered or unexported fields
}

func NewControllerSvc

func NewControllerSvc(driver *Driver, cloud Cloud) *ControllerSvc

func (*ControllerSvc) ControllerExpandVolume

func (*ControllerSvc) ControllerGetVolume

func (*ControllerSvc) ControllerPublishVolume

func (*ControllerSvc) CreateSnapshot

func (*ControllerSvc) CreateVolume

func (*ControllerSvc) DeleteSnapshot

func (*ControllerSvc) DeleteVolume

func (*ControllerSvc) GetCapacity

func (*ControllerSvc) ListSnapshots

func (*ControllerSvc) ListVolumes

type Driver

type Driver struct {
	*csicommon.CSIDriver
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(name, version, nodeId string, maxVolumesPerNode, reserveVolumesPerNode int64) *Driver

NewDriver create the identity/node/controller server and disk driver

func (*Driver) Run

func (d *Driver) Run(endpoint string, cloud Cloud)

type IdentitySvc

type IdentitySvc struct {
	// contains filtered or unexported fields
}

func NewIdentitySvc

func NewIdentitySvc(driver *Driver) *IdentitySvc

func (*IdentitySvc) GetPluginCapabilities

func (*IdentitySvc) GetPluginInfo

func (*IdentitySvc) Probe

func (ids *IdentitySvc) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)

type Mounter

type Mounter interface {
	mount.Interface

	FormatAndMount(source string, target string, fstype string, options []string) error
	GetDeviceNameFromMount(mountPath string) (string, int, error)
}

Mounter is the interface implemented by NodeMounter.

type NodeMounter

type NodeMounter struct {
	*mount.SafeFormatAndMount
}

NodeMounter implements Mounter. A superstruct of SafeFormatAndMount.

func (NodeMounter) GetDeviceNameFromMount

func (m NodeMounter) GetDeviceNameFromMount(mountPath string) (string, int, error)

GetDeviceNameFromMount returns the volume ID for a mount path.

type NodeSvc

type NodeSvc struct {
	// contains filtered or unexported fields
}

func NewNodeSvc

func NewNodeSvc(driver *Driver, mounter Mounter, cloud Cloud) *NodeSvc

func (*NodeSvc) NodeExpandVolume

func (*NodeSvc) NodeGetInfo

func (*NodeSvc) NodeGetVolumeStats

func (*NodeSvc) NodePublishVolume

func (*NodeSvc) NodeStageVolume

func (*NodeSvc) NodeUnpublishVolume

func (*NodeSvc) NodeUnstageVolume

type VolcEngin

type VolcEngin struct {
	// contains filtered or unexported fields
}

func NewVolcEngin

func NewVolcEngin(svcClients *sts.ServiceClients, region, zone string) *VolcEngin

func (*VolcEngin) AttachVolume

func (volc *VolcEngin) AttachVolume(ctx context.Context, nodeId, volId string) error

func (*VolcEngin) CreateSnapshot

func (volc *VolcEngin) CreateSnapshot(ctx context.Context, volumeID, snapshotName string) (snapshot *types.Snapshot, err error)

func (*VolcEngin) CreateVolume

func (volc *VolcEngin) CreateVolume(ctx context.Context, name, volumeType, zoneId, snapshotId string, capacity int64) (id string, err error)

func (*VolcEngin) DeleteSnapshot

func (volc *VolcEngin) DeleteSnapshot(ctx context.Context, snapshotID string) error

func (*VolcEngin) DeleteVolume

func (volc *VolcEngin) DeleteVolume(ctx context.Context, id string) error

func (*VolcEngin) DescribeInstanceTypes

func (volc *VolcEngin) DescribeInstanceTypes(ctx context.Context, typeName string) (*types.InstanceTypeForDescribeInstanceTypesOutput, error)

func (*VolcEngin) DetachVolume

func (volc *VolcEngin) DetachVolume(ctx context.Context, nodeId, volId string) error

func (*VolcEngin) DevicePathByVolId

func (volc *VolcEngin) DevicePathByVolId(volId string) string

func (*VolcEngin) ExtendVolume

func (volc *VolcEngin) ExtendVolume(ctx context.Context, id string, newSize int64) (err error)

func (*VolcEngin) GetSnapshotByID

func (volc *VolcEngin) GetSnapshotByID(ctx context.Context, snapshotID string) (snapshot *types.Snapshot, err error)

func (*VolcEngin) GetSnapshotByName

func (volc *VolcEngin) GetSnapshotByName(ctx context.Context, name string) (snapshot *types.Snapshot, err error)

func (*VolcEngin) NodeById

func (*VolcEngin) Region

func (volc *VolcEngin) Region() string

func (*VolcEngin) Topology

func (volc *VolcEngin) Topology() map[string]string

func (*VolcEngin) VolumeById

func (volc *VolcEngin) VolumeById(ctx context.Context, id string) (vol *types.Volume, err error)

func (*VolcEngin) VolumeByName

func (volc *VolcEngin) VolumeByName(ctx context.Context, name string) (vol *types.Volume, err error)

func (*VolcEngin) WaitVolumeBeCreated

func (volc *VolcEngin) WaitVolumeBeCreated(ctx context.Context, id string) error

func (*VolcEngin) WaitVolumeBeExtended

func (volc *VolcEngin) WaitVolumeBeExtended(ctx context.Context, id string, sizeBytes int64) error

func (*VolcEngin) WaitVolumeBeStatus

func (volc *VolcEngin) WaitVolumeBeStatus(ctx context.Context, id, status string) error

func (*VolcEngin) Zone

func (volc *VolcEngin) Zone() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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