sfs

package
v0.0.0-...-4625a4a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(source, target, mountOptions string) error

func NewControllerServer

func NewControllerServer(d *SfsDriver) *controllerServer

func NewIdentityServer

func NewIdentityServer(d *SfsDriver) *identityServer

func NewNodeServer

func NewNodeServer(d *SfsDriver) *nodeServer

func ParseEndpoint

func ParseEndpoint(ep string) (string, string, error)

func RoundUpSize

func RoundUpSize(volumeSizeBytes int64, allocationUnitBytes int64) int64

RoundUpSize calculates how many allocation units are needed to accommodate a volume of given size. E.g. when user wants 1500MiB volume, while AWS EBS allocates volumes in gibibyte-sized chunks, RoundUpSize(1500 * 1024*1024, 1024*1024*1024) returns '2' (2 GiB is the smallest allocatable volume that can hold 1500MiB)

func Run

func Run(cmd string) (string, error)

func RunControllerandNodePublishServer

func RunControllerandNodePublishServer(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)

func Unmount

func Unmount(target string) error

Types

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()
}

NonBlockingGRPCServer defines Non blocking GRPC server interfaces

func NewNonBlockingGRPCServer

func NewNonBlockingGRPCServer() NonBlockingGRPCServer

type SfsDriver

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

func NewDriver

func NewDriver(nodeID, endpoint, shareProto string, cloud config.CloudCredentials) *SfsDriver

func (*SfsDriver) AddControllerServiceCapabilities

func (d *SfsDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type)

func (*SfsDriver) AddVolumeCapabilityAccessModes

func (d *SfsDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) []*csi.VolumeCapability_AccessMode

func (*SfsDriver) GetVolumeCapabilityAccessModes

func (d *SfsDriver) GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode

func (*SfsDriver) Run

func (d *SfsDriver) Run()

func (*SfsDriver) ValidateControllerServiceRequest

func (d *SfsDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error

Jump to

Keyboard shortcuts

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