lvm

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(c HTTPClient) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)

Create Create an LVM Volume Group

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)

Delete Remove an LVM Volume Group.

func (*Client) Index

func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)

Index List LVM Volume Groups

type CreateRequest

type CreateRequest struct {
	Device string `url:"device",json:"device"` // The block device you want to create the volume group on
	Name   string `url:"name",json:"name"`     // The storage identifier.
	Node   string `url:"node",json:"node"`     // The cluster node name.

	// The following parameters are optional
	AddStorage *bool `url:"add_storage,omitempty",json:"add_storage,omitempty"` // Configure storage using the Volume Group
}

type CreateResponse

type CreateResponse string

type DeleteRequest

type DeleteRequest struct {
	Name string `url:"name",json:"name"` // The storage identifier.
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	CleanupConfig *bool `url:"cleanup-config,omitempty",json:"cleanup-config,omitempty"` // Marks associated storage(s) as not available on this node anymore or removes them from the configuration (if configured for this node only).
	CleanupDisks  *bool `url:"cleanup-disks,omitempty",json:"cleanup-disks,omitempty"`   // Also wipe disks so they can be repurposed afterwards.
}

type DeleteResponse

type DeleteResponse string

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

type IndexRequest

type IndexRequest struct {
	Node string `url:"node",json:"node"` // The cluster node name.

}

type IndexResponse

type IndexResponse struct {
	Children []*struct {
		Free int    `url:"free",json:"free"` // The free bytes in the volume group
		Leaf bool   `url:"leaf",json:"leaf"`
		Name string `url:"name",json:"name"` // The name of the volume group
		Size int    `url:"size",json:"size"` // The size of the volume group in bytes

		// The following parameters are optional
		Children []*struct {
			Free int    `url:"free",json:"free"` // The free bytes in the physical volume
			Leaf bool   `url:"leaf",json:"leaf"`
			Name string `url:"name",json:"name"` // The name of the physical volume
			Size int    `url:"size",json:"size"` // The size of the physical volume in bytes

		} `url:"children,omitempty",json:"children,omitempty"` // The underlying physical volumes
	} `url:"children",json:"children"`
	Leaf bool `url:"leaf",json:"leaf"`
}

Jump to

Keyboard shortcuts

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