volume

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package volume is the contract between a caller's sandbox driver and the node plugin: the volume attributes of a workspace.

Index

Constants

View Source
const (
	CtlDir     = "/run/motte-vfs"
	CtlSocket  = "ctl.sock"
	SockEnv    = "MOTTE_VFS_SOCK"
	PodUIDAttr = "csi.storage.k8s.io/pod.uid"
	// PodNamespaceAttr is the namespace of the pod. The kubelet sets it when the CSIDriver has podInfoOnMount.
	PodNamespaceAttr = "csi.storage.k8s.io/pod.namespace"
)

The workspace sees the control socket of its mount at CtlDir/CtlSocket, bound by a volume with CtlAttributes.

View Source
const GrantEnv = "MOTTE_VFS_GRANT"

GrantEnv names the environment variable that carries a bearer grant to motte-vfsd.

View Source
const GrantRefused = "the store refused the node grant"

GrantRefused is the text of the error that the node plugin returns when the store refuses a node grant.

Variables

This section is empty.

Functions

func CtlAttributes

func CtlAttributes(workspace string) map[string]string

CtlAttributes returns the attributes of the volume that binds the control socket of one workspace into a pod. A pod with two workspace volumes has two control socket volumes.

func IsCtl

func IsCtl(attrs map[string]string) bool

IsCtl reports whether attrs are the attributes of a control socket volume.

func ValidWorkspace added in v0.5.0

func ValidWorkspace(id string) bool

ValidWorkspace reports whether id can name a workspace. The node plugin uses it as a directory name.

Types

type Publication

type Publication struct {
	Workspace string
	Epoch     uint64
	Repo      string // "<prefix>:<path>"
	Commit    string
	// Runtime names the sandbox runtime of the node; it only labels telemetry.
	Runtime string
}

Publication is what the caller tells the node plugin about one workspace volume. It travels as the volume attributes of the inline CSI volume of the pod.

func ParsePublication

func ParsePublication(attrs map[string]string) (Publication, error)

ParsePublication reads the volume attributes of a publish request.

func (Publication) Attributes

func (p Publication) Attributes() map[string]string

Attributes returns the CSI volume attributes of p.

Jump to

Keyboard shortcuts

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