glusterfs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KB int64 = 1024
	MB int64 = 1024 * KB
	GB int64 = 1024 * MB
	TB int64 = 1024 * GB
)

Common allocation units

Variables

This section is empty.

Functions

func RoundUpSize

func RoundUpSize(volumeSizeBytes int64, allocationUnitBytes int64) int64

RoundUpSize calculates how many allocation units are needed to accommodate a volume of given size. RoundUpSize(1500 * 1000*1000, 1000*1000*1000) returns '2' (2 GB is the smallest allocatable volume that can hold 1500MiB)

func RoundUpToGB

func RoundUpToGB(sizeBytes int64) int64

RoundUpToGB rounds up given quantity upto chunks of GB

Types

type ControllerServer

type ControllerServer struct {
	*Driver
}

ControllerServer struct of GlusterFS CSI driver with supported methods of CSI controller server spec.

func NewControllerServer

func NewControllerServer(driver *Driver) *ControllerServer

NewControllerServer create new instance controller

func (*ControllerServer) ControllerExpandVolume

ControllerExpandVolume resizes a volume

func (*ControllerServer) ControllerGetCapabilities

ControllerGetCapabilities returns the capabilities of the controller service.

func (*ControllerServer) ControllerGetVolume

ControllerGetVolume get volume info

func (*ControllerServer) ControllerPublishVolume

ControllerPublishVolume return Unimplemented error

func (*ControllerServer) ControllerUnpublishVolume

ControllerUnpublishVolume return Unimplemented error

func (*ControllerServer) CreateSnapshot

CreateSnapshot create snapshot of an existing PV

func (*ControllerServer) CreateVolume

CreateVolume creates and starts the volume

func (*ControllerServer) DeleteSnapshot

DeleteSnapshot delete provided snapshot of a PV

func (*ControllerServer) DeleteVolume

DeleteVolume deletes the given volume

func (*ControllerServer) GetCapacity

GetCapacity returns the capacity of the storage pool

func (*ControllerServer) ListSnapshots

ListSnapshots list the snapshots of a PV

func (*ControllerServer) ListVolumes

ListVolumes returns a list of volumes

func (*ControllerServer) ValidateVolumeCapabilities

ValidateVolumeCapabilities checks whether the volume capabilities requested are supported.

type Driver

type Driver struct {
	*config.Config
}

Driver is the struct embedding information about the connection to gluster cluster and configuration of CSI driver.

func NewDriver

func NewDriver(config *config.Config) (*Driver, error)

NewDriver create new instance driver

func (*Driver) Run

func (driver *Driver) Run()

Run start server

type IdentityServer

type IdentityServer struct {
	*Driver
}

IdentityServer struct of Glusterfs CSI driver with supported methods of CSI identity server spec.

func NewIdentityServer

func NewIdentityServer(driver *Driver) *IdentityServer

NewIdentityServer create new instance identity

func (*IdentityServer) GetPluginCapabilities

GetPluginCapabilities returns available capabilities of the plugin

func (*IdentityServer) GetPluginInfo

GetPluginInfo returns metadata of the plugin

func (*IdentityServer) Probe

Probe returns the health and readiness of the plugin

type NodeServer

type NodeServer struct {
	*Driver
	// contains filtered or unexported fields
}

NodeServer struct of Glusterfs CSI driver with supported methods of CSI node server spec.

func NewNodeServer

func NewNodeServer(driver *Driver) *NodeServer

NewNodeServer create new instance node

func (*NodeServer) NodeExpandVolume

NodeExpandVolume expanding the file system on the node

func (*NodeServer) NodeGetCapabilities

NodeGetCapabilities returns the supported capabilities of the node server

func (*NodeServer) NodeGetInfo

NodeGetInfo returns NodeGetInfoResponse for CO.

func (*NodeServer) NodeGetVolumeStats

NodeGetVolumeStats returns volume capacity statistics available for the volume

func (*NodeServer) NodePublishVolume

NodePublishVolume mounts the volume mounted to the staging path to the target path

func (*NodeServer) NodeStageVolume

NodeStageVolume mounts the volume to a staging path on the node.

func (*NodeServer) NodeUnpublishVolume

NodeUnpublishVolume unmounts the volume from the target path

func (*NodeServer) NodeUnstageVolume

NodeUnstageVolume unstages the volume from the staging path

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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