ceph

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

func NewPlugin

func NewPlugin(provider Provider) volume.Plugin

Types

type BlockCache

type BlockCache struct {
	NoFlush   bool `json:"no-flush"`
	Direct    bool `json:"direct"`
	Writeback bool `json:"writeback"`
}

type BlockDevice

type BlockDevice struct {
	IOPSRd           int        `json:"iops_rd"`
	IOPSWr           int        `json:"iops_wr"`
	IOPS             int        `json:"iops"`
	BPSRd            int        `json:"bps_rd"`
	BPSWr            int        `json:"bps_wr"`
	BPS              int        `json:"bps"`
	WriteThreshold   int        `json:"write_threshold"`
	DetectZeroes     string     `json:"detect_zeroes"`
	NodeName         string     `json:"node-name"`
	BackingFileDepth int        `json:"backing_file_depth"`
	Drv              string     `json:"drv"`
	RO               bool       `json:"ro"`
	Encrypted        bool       `json:"encrypted"`
	Image            BlockImage `json:"image"`
	File             string     `json:"file"`
	Cache            BlockCache `json:"cache"`
}

type BlockDevicesResponse

type BlockDevicesResponse struct {
	Data []BlockDevice `json:"return"`
}

type BlockExportAddArguments

type BlockExportAddArguments struct {
	ID       string `json:"id"`
	NodeName string `json:"node-name"`
	Type     string `json:"type"`
	Addr     struct {
		Type string `json:"type"`
		Path string `json:"path"`
	} `json:"addr"`
	Writable bool `json:"writable"`
}

type BlockExportNode

type BlockExportNode struct {
	NodeName     string `json:"node-name"`
	ShuttingDown bool   `json:"shutting-down"`
	Type         string `json:"type"`
	ID           string `json:"id"`
}

type BlockExportResponse

type BlockExportResponse struct {
	Data []BlockExportNode `json:"return"`
}

type BlockImage

type BlockImage struct {
	VirtualSize    int64                `json:"virtual-size"`
	Filename       string               `json:"filename"`
	ClusterSize    int64                `json:"cluster-size"`
	Format         string               `json:"format"`
	DirtyFlag      bool                 `json:"dirty-flag"`
	FormatSpecific FormatSpecificDetail `json:"format-specific"`
}

type BlockdevAddArguments

type BlockdevAddArguments struct {
	NodeName string `json:"node-name"`
	Driver   string `json:"driver"`
	Pool     string `json:"pool"`
	Image    string `json:"image"`
	User     string `json:"user"`
	Conf     string `json:"conf"`
	Discard  string `json:"discard"`
	Cache    struct {
		Direct bool `json:"direct"`
	} `json:"cache"`
}

type DeleteBlockDevArguments

type DeleteBlockDevArguments struct {
	Node string `json:"node-name"`
}

type DeleteExportBlockDevArguments

type DeleteExportBlockDevArguments struct {
	ID string `json:"id"`
}

type FormatSpecificDetail

type FormatSpecificDetail struct {
	Type string      `json:"type"`
	Data interface{} `json:"data"` // empty object, or make a real struct if known
}

type Provider

type Provider interface {
	Mount(ctx context.Context, machineID string, volume *validatedVolume) (string, error)
	Unmount(ctx context.Context, machineID string, volumeID string) error
}

func QMPProvider

func QMPProvider(ctx context.Context, log logr.Logger, paths host.Paths, socket string) (Provider, error)

type QMP

type QMP struct {
	// contains filtered or unexported fields
}

func (*QMP) Mount

func (q *QMP) Mount(_ context.Context, machineID string, volume *validatedVolume) (string, error)

func (*QMP) Unmount

func (q *QMP) Unmount(_ context.Context, machineID string, volumeName string) error

type QMPRequest

type QMPRequest[T any] struct {
	Execute   string `json:"execute"`
	Arguments T      `json:"arguments,omitempty"`
}

Jump to

Keyboard shortcuts

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