resvol

package
v0.0.0-...-63b02d4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package resvol is the volume resource driver

A volume resource is linked to a volume object named <name> in the namespace of the service.

The volume object contains disk and fs resources configured by the <pool> that created it, so the service doesn't have to embed driver keywords that would prevent the service from being run on another cluster with different capabilities.

Access: * rwo Read Write Once * rwx Read Write Many * roo Read Only Once * rox Read Only Many

Index

Constants

View Source
const (
	Usage int = iota
	NoUsage
)

Variables

This section is empty.

Functions

func New

func New() resource.Driver

Types

type Metadata

type Metadata struct {
	ToPath    string
	FromKey   string
	FromStore naming.Path
}

Metadata is the result of a Reference parsing.

func (Metadata) IsEmpty

func (t Metadata) IsEmpty() bool

type Reference

type Reference string

Reference is an element of the Configs and Secrets T field. This type exists to host the parsing functions.

type SigRoute

type SigRoute struct {
	Signum syscall.Signal
	RID    string
}

SigRoute is a relation between a signal number and the id of a resource supporting signaling

type T

type T struct {
	resource.T
	Name        string       `json:"name"`
	Access      string       `json:"access"`
	Pool        string       `json:"pool"`
	PoolType    string       `json:"type"`
	Size        *int64       `json:"size"`
	Format      bool         `json:"format"`
	Configs     []string     `json:"configs"`
	Secrets     []string     `json:"secrets"`
	Directories []string     `json:"directories"`
	User        string       `json:"user"`
	Group       string       `json:"group"`
	Perm        *os.FileMode `json:"perm"`
	DirPerm     *os.FileMode `json:"dirperm"`
	Signal      string       `json:"signal"`

	Path     naming.Path
	Topology topology.T
	Nodes    []string
}

func (T) ExposedDevices

func (t T) ExposedDevices() device.L

func (T) HasMetadata

func (t T) HasMetadata(p naming.Path, k string) bool

HasMetadata returns true if the volume has a configs or secrets reference to <namespace>/<kind>/<name>[/<key>]

func (T) Head

func (t T) Head() string

func (T) InstallDataByKind

func (t T) InstallDataByKind(filter naming.Kind) (bool, error)

func (T) Label

func (t T) Label() string

func (T) Manifest

func (t T) Manifest() *manifest.T

Manifest exposes to the core the input expected by the driver.

func (T) ProvisionLeaded

func (t T) ProvisionLeaded(ctx context.Context) error

func (T) ProvisionLeader

func (t T) ProvisionLeader(ctx context.Context) error

func (T) Provisioned

func (t T) Provisioned() (provisioned.T, error)

func (T) SendSignals

func (t T) SendSignals() error

func (T) Start

func (t T) Start(ctx context.Context) error

func (*T) Status

func (t *T) Status(ctx context.Context) status.T

func (T) Stop

func (t T) Stop(ctx context.Context) error

func (T) UnprovisionLeaded

func (t T) UnprovisionLeaded(ctx context.Context) error

func (T) UnprovisionLeader

func (t T) UnprovisionLeader(ctx context.Context) error

func (*T) Volume

func (t *T) Volume() (object.Vol, error)

Jump to

Keyboard shortcuts

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