drivercatalog

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 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 drivercatalog describes the drivers of the node: what each does, in a line, the features it has, named in a vocabulary of its own, the drivers a virtual driver selects among, and whether the node has what the driver needs.

The features are words of their own rather than the names of the interfaces of the resource package they are told from: those are code, and a refactor renaming one would break a client keying on it.

Index

Constants

This section is empty.

Variables

View Source
var Features = []FeatureDoc{
	{FeatureProvision, "The provision makes what the resource stands for, as a logical volume or a filesystem, and the resource can be configured on one made by a sysadmin instead."},
	{FeatureUnprovision, "The unprovision removes what the provision made."},
	{FeatureStart, "The start brings the resource up, as a mount or an activation."},
	{FeatureStop, "The stop brings the resource down."},
	{FeatureRun, "The resource is a task, which runs on a schedule or on demand rather than being up or down."},
	{FeatureSync, "The resource copies or snapshots data, on a schedule or on demand, with the sync actions."},
	{FeatureSnapshot, "The storage of the resource takes point-in-time snapshots, which backups copy from."},
	{FeatureResize, "The resource is grown in place by a resize."},
	{FeatureSignal, "The processes of the resource are sent a signal by the signal action."},
	{FeatureAbort, "The resource stops an orchestrated start before it begins, when starting it would harm, as an address already in use."},
	{FeatureMove, "The resource moves live to another node, by a switch or a takeover with --live."},
	{FeatureEncap, "The resource is a guest om also runs in, which holds encapsulated resources."},
}

Features is the vocabulary, in the order the features of a driver are listed in.

Functions

func APIList

func APIList(nodename string) api.DriverList

APIList returns the catalog of the drivers of the node, as the api answers it.

Types

type Entry

type Entry struct {
	ID driver.ID

	// Doc is the line saying what the driver does.
	Doc string

	// AliasOf is the driver this one is another name of, kept
	// for the configurations written with it.
	AliasOf driver.ID

	// Selects are the drivers a virtual driver picks among on a
	// node, in the order it prefers them.
	Selects driver.IDs

	// Features are what the driver does, in the vocabulary of
	// Features. A virtual driver has the ones of the driver it
	// selects on the node.
	Features []Feature

	// Available says the node has what the driver needs, as its
	// capabilities say.
	Available bool

	// Grant is the grant a service needs to use the driver at all,
	// empty when any user granted on the namespace may: the one
	// choosing the driver needs, or the one a keyword the driver
	// requires needs whatever its value.
	Grant string

	// ProvisionGrant is the grant only the provision of the
	// resource needs, beyond Grant: the one a keyword the
	// provision fails without needs whatever its value. A user not
	// holding it may still use the driver on what a sysadmin
	// provisioned, with provision = false.
	ProvisionGrant string
}

Entry is a driver of the catalog.

func List

func List() []Entry

List returns the drivers registered, in a stable order. Only a resource driver has features.

type Feature

type Feature string

Feature is a word of the vocabulary saying what a driver does.

const (
	FeatureProvision   Feature = "provision"
	FeatureUnprovision Feature = "unprovision"
	FeatureStart       Feature = "start"
	FeatureStop        Feature = "stop"
	FeatureRun         Feature = "run"
	FeatureSync        Feature = "sync"
	FeatureSnapshot    Feature = "snapshot"
	FeatureResize      Feature = "resize"
	FeatureSignal      Feature = "signal"
	FeatureAbort       Feature = "abort"
	FeatureMove        Feature = "move"
	FeatureEncap       Feature = "encap"
)

func FeaturesOf

func FeaturesOf(r any) []Feature

FeaturesOf returns the features of the resource r.

type FeatureDoc

type FeatureDoc struct {
	Name Feature
	Doc  string
}

FeatureDoc is a feature and what it means.

Jump to

Keyboard shortcuts

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