osd

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 OSD

func (*Client) Delete

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

Delete Destroy OSD

func (*Client) In

func (c *Client) In(ctx context.Context, req *InRequest) (*InResponse, error)

In ceph osd in

func (*Client) Index

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

Index Get Ceph osd list/tree.

func (*Client) Out

func (c *Client) Out(ctx context.Context, req *OutRequest) (*OutResponse, error)

Out ceph osd out

func (*Client) Scrub

func (c *Client) Scrub(ctx context.Context, req *ScrubRequest) (*ScrubResponse, error)

Scrub Instruct the OSD to scrub.

type CreateRequest

type CreateRequest struct {
	Dev  string `url:"dev",json:"dev"`   // Block device name.
	Node string `url:"node",json:"node"` // The cluster node name.

	// The following parameters are optional
	CrushDeviceClass *string  `url:"crush-device-class,omitempty",json:"crush-device-class,omitempty"` // Set the device class of the OSD in crush.
	DbDev            *string  `url:"db_dev,omitempty",json:"db_dev,omitempty"`                         // Block device name for block.db.
	DbDevSize        *float64 `url:"db_dev_size,omitempty",json:"db_dev_size,omitempty"`               // Size in GiB for block.db.
	Encrypted        *bool    `url:"encrypted,omitempty",json:"encrypted,omitempty"`                   // Enables encryption of the OSD.
	WalDev           *string  `url:"wal_dev,omitempty",json:"wal_dev,omitempty"`                       // Block device name for block.wal.
	WalDevSize       *float64 `url:"wal_dev_size,omitempty",json:"wal_dev_size,omitempty"`             // Size in GiB for block.wal.
}

type CreateResponse

type CreateResponse string

type DeleteRequest

type DeleteRequest struct {
	Node  string `url:"node",json:"node"`   // The cluster node name.
	Osdid int    `url:"osdid",json:"osdid"` // OSD ID

	// The following parameters are optional
	Cleanup *bool `url:"cleanup,omitempty",json:"cleanup,omitempty"` // If set, we remove partition table entries.
}

type DeleteResponse

type DeleteResponse string

type HTTPClient

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

type InRequest

type InRequest struct {
	Node  string `url:"node",json:"node"`   // The cluster node name.
	Osdid int    `url:"osdid",json:"osdid"` // OSD ID

}

type InResponse

type InResponse map[string]interface{}

type IndexRequest

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

}

type IndexResponse

type IndexResponse map[string]interface{}

type OutRequest

type OutRequest struct {
	Node  string `url:"node",json:"node"`   // The cluster node name.
	Osdid int    `url:"osdid",json:"osdid"` // OSD ID

}

type OutResponse

type OutResponse map[string]interface{}

type ScrubRequest

type ScrubRequest struct {
	Node  string `url:"node",json:"node"`   // The cluster node name.
	Osdid int    `url:"osdid",json:"osdid"` // OSD ID

	// The following parameters are optional
	Deep *bool `url:"deep,omitempty",json:"deep,omitempty"` // If set, instructs a deep scrub instead of a normal one.
}

type ScrubResponse

type ScrubResponse map[string]interface{}

Jump to

Keyboard shortcuts

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