service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of the CSI plugin
	Name = "com.thecodeteam.blockdevices"

	// SupportedVersions is a list of supported CSI versions
	SupportedVersions = "0.1.0"
)
View Source
const (
	// EnvBlockDevDir is the name of the environment variable used to
	// specify the directory to search for valid block device to be used
	// by the plugin
	EnvBlockDevDir = "X_CSI_BD_DEVDIR"
)

Variables

View Source
var Manifest = map[string]string{
	"url":    "https://github.com/rexray/csi-blockdevices",
	"semver": core.SemVer,
	"commit": core.CommitSha32,
	"formed": core.CommitTime.Format(time.RFC1123),
}

Manifest is the SP's manifest.

Functions

This section is empty.

Types

type Device

type Device struct {
	FullPath string
	Name     string
	RealDev  string
}

Device is a struct for holding details about a block device

func GetDevice

func GetDevice(path string) (*Device, error)

GetDevice returns a Device struct with info about the given device, or an error if it doesn't exist or is not a block device

func GetDeviceInDir

func GetDeviceInDir(dir, name string) (*Device, error)

GetDeviceInDir returns a Device struct with info about the given device, by looking for name in dir.

func ListDevices

func ListDevices(dir string) ([]*Device, error)

ListDevices returns a slice of Device for all valid blockdevices found in the given device directory

type Service

Service is the CSI Network File System (NFS) service provider.

func New

func New() Service

New returns a new Service

Jump to

Keyboard shortcuts

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