service

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of the CSI plug-in.
	Name = "csi-vfs"

	// BindFSEnvVar is the name of the environment variable
	// used to obtain the path to the `bindfs` binary -- a
	// program used to provide bind mounting via FUSE on
	// operating systems that do not natively support bind
	// mounts.
	//
	// If no value is specified and `bindfs` is required, ex.
	// darwin, then `bindfs` is looked up via the path.
	BindFSEnvVar = "X_CSI_VFS_BINDFS"

	// DataDirEnvVar is the name of the environment variable
	// used to obtain the path to the VFS plug-in's data directory.
	//
	// If not specified, the directory defaults to `$HOME/.csi-vfs`.
	DataDirEnvVar = "X_CSI_VFS_DATA"

	// DevDirEnvVar is the name of the environment variable
	// used to obtain the path to the VFS plug-in's `dev` directory.
	//
	// If not specified, the directory defaults to `$X_CSI_VFS_DATA/dev`.
	DevDirEnvVar = "X_CSI_VFS_DEV"

	// MntDirEnvVar is the name of the environment variable
	// used to obtain the path to the VFS plug-in's `mnt` directory.
	//
	// If not specified, the directory defaults to `$X_CSI_VFS_DATA/mnt`.
	MntDirEnvVar = "X_CSI_VFS_MNT"

	// VolDirEnvVar is the name of the environment variable
	// used to obtain the path to the VFS plug-in's `vol` directory.
	//
	// If not specified, the directory defaults to `$X_CSI_VFS_DATA/vol`.
	VolDirEnvVar = "X_CSI_VFS_VOL"

	// VolGlobEnvVar is the name of the environment variable
	// used to obtain the glob pattern used to list the files inside
	// the $X_CSI_VFS_VOL directory. Matching files are considered
	// volumes.
	//
	// If not specified, the glob pattern defaults to `*`.
	//
	// Valid patterns are documented at
	// https://golang.org/pkg/path/filepath/#Match.
	VolGlobEnvVar = "X_CSI_VFS_VOL_GLOB"
)
View Source
const GRPCMetadataTargetPaths = "rexray.docker2csi.targetpaths"

GRPCMetadataTargetPaths is the key in gRPC metatdata that is set to "true" if a ListVolumes RPC should return VolumeInfo objects with associated mount path information.

Variables

View Source
var (
	// SupportedVersions is a list of the versions this CSI plug-in supports.
	SupportedVersions = []*csi.Version{
		&csi.Version{
			Major: 0,
			Minor: 0,
			Patch: 0,
		},
		&csi.Version{
			Major: 0,
			Minor: 1,
			Patch: 0,
		},
	}
)

Functions

func FileExists added in v0.1.2

func FileExists(filePath string) bool

FileExists returns a flag indicating whether or not a file path exists.

func GetVolumeInfo added in v0.1.7

func GetVolumeInfo(
	ctx context.Context, volumeID, mntDir string) (csi.VolumeInfo, error)

GetVolumeInfo returns a csi.VolumeInfo object about the specified volume, possibly including mount information.

func GetVolumeMountPaths added in v0.1.7

func GetVolumeMountPaths(
	ctx context.Context, mntDir, volumeID string) ([]string, error)

GetVolumeMountPaths returns one or more paths where the specified volume is mounted.

func InitConfig added in v0.1.2

func InitConfig(
	data, dev, mnt, vol, volGlob, bindfs *string)

InitConfig initializes several CSI-VFS configuration properties.

Types

type Service

type Service interface {
	csi.ControllerServer
	csi.IdentityServer
	csi.NodeServer
}

Service is the CSI Virtual File System (VFS) service provider.

func New

func New(data, dev, mnt, vol, volGlob, bindfs string) Service

New returns a new Service using the specified path for the plug-in's root data directory.

Jump to

Keyboard shortcuts

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