Documentation
¶
Index ¶
- type Client
- func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
- func (c *Client) Initgpt(ctx context.Context, req *InitgptRequest) (*InitgptResponse, error)
- func (c *Client) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
- func (c *Client) Smart(ctx context.Context, req *SmartRequest) (*SmartResponse, error)
- func (c *Client) WipeDiskWipedisk(ctx context.Context, req *WipeDiskWipediskRequest) (*WipeDiskWipediskResponse, error)
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type InitgptRequest
- type InitgptResponse
- type ListRequest
- type ListResponse
- type SmartRequest
- type SmartResponse
- type WipeDiskWipediskRequest
- type WipeDiskWipediskResponse
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) Index ¶
func (c *Client) Index(ctx context.Context, req *IndexRequest) (*IndexResponse, error)
Index Node index.
func (*Client) Initgpt ¶
func (c *Client) Initgpt(ctx context.Context, req *InitgptRequest) (*InitgptResponse, error)
Initgpt Initialize Disk with GPT
func (*Client) List ¶
func (c *Client) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
List List local disks.
func (*Client) Smart ¶
func (c *Client) Smart(ctx context.Context, req *SmartRequest) (*SmartResponse, error)
Smart Get SMART Health of a disk.
func (*Client) WipeDiskWipedisk ¶
func (c *Client) WipeDiskWipedisk(ctx context.Context, req *WipeDiskWipediskRequest) (*WipeDiskWipediskResponse, error)
WipeDiskWipedisk Wipe a disk or partition.
type HTTPClient ¶
type IndexRequest ¶
type IndexRequest struct {
Node string `url:"node" json:"node"` // The cluster node name.
}
type IndexResponse ¶
type IndexResponse []*map[string]interface{}
type InitgptRequest ¶
type InitgptResponse ¶
type InitgptResponse string
type ListRequest ¶
type ListRequest struct {
Node string `url:"node" json:"node"` // The cluster node name.
// The following parameters are optional
IncludePartitions *util.SpecialBool `url:"include-partitions,omitempty" json:"include-partitions,omitempty"` // Also include partitions.
Skipsmart *util.SpecialBool `url:"skipsmart,omitempty" json:"skipsmart,omitempty"` // Skip smart checks.
Type *string `url:"type,omitempty" json:"type,omitempty"` // Only list specific types of disks.
}
type ListResponse ¶
type ListResponse []*struct {
Devpath string `url:"devpath" json:"devpath"` // The device path
Gpt util.SpecialBool `url:"gpt" json:"gpt"`
Mounted util.SpecialBool `url:"mounted" json:"mounted"`
Osdid int `url:"osdid" json:"osdid"`
Size int `url:"size" json:"size"`
// The following parameters are optional
Health *string `url:"health,omitempty" json:"health,omitempty"`
Model *string `url:"model,omitempty" json:"model,omitempty"`
Parent *string `url:"parent,omitempty" json:"parent,omitempty"` // For partitions only. The device path of the disk the partition resides on.
Serial *string `url:"serial,omitempty" json:"serial,omitempty"`
Used *string `url:"used,omitempty" json:"used,omitempty"`
Vendor *string `url:"vendor,omitempty" json:"vendor,omitempty"`
Wwn *string `url:"wwn,omitempty" json:"wwn,omitempty"`
}
type SmartRequest ¶
type SmartRequest struct {
Disk string `url:"disk" json:"disk"` // Block device name
Node string `url:"node" json:"node"` // The cluster node name.
// The following parameters are optional
Healthonly *util.SpecialBool `url:"healthonly,omitempty" json:"healthonly,omitempty"` // If true returns only the health status
}
type SmartResponse ¶
type SmartResponse struct {
Health string `url:"health" json:"health"`
// The following parameters are optional
Attributes []*map[string]interface{} `url:"attributes,omitempty" json:"attributes,omitempty"`
Text *string `url:"text,omitempty" json:"text,omitempty"`
Type *string `url:"type,omitempty" json:"type,omitempty"`
}
type WipeDiskWipediskRequest ¶
type WipeDiskWipediskResponse ¶
type WipeDiskWipediskResponse string
Click to show internal directories.
Click to hide internal directories.