Documentation
¶
Index ¶
- type Children
- type Client
- func (c *Client) Create(ctx context.Context, req CreateRequest) (string, error)
- func (c *Client) Delete(ctx context.Context, req DeleteRequest) (string, error)
- func (c *Client) Find(ctx context.Context, req FindRequest) (FindResponse, error)
- func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
- type CreateRequest
- type DeleteRequest
- type DraidConfig
- type DraidConfigArr
- type FindRequest
- type FindResponse
- type HTTPClient
- type IndexRequest
- type IndexResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Children ¶ added in v0.0.10
type Children struct {
Msg string `url:"msg" json:"msg"` // An optional message about the vdev.
Name string `url:"name" json:"name"` // The name of the vdev or section.
// The following parameters are optional
Cksum *float64 `url:"cksum,omitempty" json:"cksum,omitempty"`
Read *float64 `url:"read,omitempty" json:"read,omitempty"`
State *string `url:"state,omitempty" json:"state,omitempty"` // The state of the vdev.
Write *float64 `url:"write,omitempty" json:"write,omitempty"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req FindRequest) (FindResponse, error)
Find Get details about a zpool.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context, req IndexRequest) ([]IndexResponse, error)
Index List Zpools.
type CreateRequest ¶
type CreateRequest struct {
Devices string `url:"devices" json:"devices"` // The block devices you want to create the zpool on.
Name string `url:"name" json:"name"` // The storage identifier.
Node string `url:"node" json:"node"` // The cluster node name.
Raidlevel string `url:"raidlevel" json:"raidlevel"` // The RAID level to use.
// The following parameters are optional
AddStorage *util.SpecialBool `url:"add_storage,omitempty" json:"add_storage,omitempty"` // Configure storage using the zpool.
Ashift *int `url:"ashift,omitempty" json:"ashift,omitempty"` // Pool sector size exponent.
Compression *string `url:"compression,omitempty" json:"compression,omitempty"` // The compression algorithm to use.
DraidConfig *DraidConfig `url:"draid-config,omitempty" json:"draid-config,omitempty"`
}
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 *util.SpecialBool `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 *util.SpecialBool `url:"cleanup-disks,omitempty" json:"cleanup-disks,omitempty"` // Also wipe disks so they can be repurposed afterwards.
}
type DraidConfig ¶ added in v0.0.10
type DraidConfig struct {
Data int `url:"data" json:"data"` // The number of data devices per redundancy group. (dRAID)
Spares int `url:"spares" json:"spares"` // Number of dRAID spares.
}
func (DraidConfig) EncodeValues ¶ added in v0.0.10
func (t DraidConfig) EncodeValues(key string, v *url.Values) error
type DraidConfigArr ¶ added in v0.0.10
type DraidConfigArr []DraidConfig
Array of DraidConfig
func (DraidConfigArr) EncodeValues ¶ added in v0.0.10
func (t DraidConfigArr) EncodeValues(key string, v *url.Values) error
type FindRequest ¶
type FindResponse ¶
type FindResponse struct {
Children []Children `url:"children" json:"children"` // The pool configuration information, including the vdevs for each section (e.g. spares, cache), may be nested.
Errors string `url:"errors" json:"errors"` // Information about the errors on the zpool.
Name string `url:"name" json:"name"` // The name of the zpool.
State string `url:"state" json:"state"` // The state of the zpool.
// The following parameters are optional
Action *string `url:"action,omitempty" json:"action,omitempty"` // Information about the recommended action to fix the state.
Scan *string `url:"scan,omitempty" json:"scan,omitempty"` // Information about the last/current scrub.
Status *string `url:"status,omitempty" json:"status,omitempty"` // Information about the state of the zpool.
}
type HTTPClient ¶
type IndexRequest ¶
type IndexRequest struct {
Node string `url:"node" json:"node"` // The cluster node name.
}
type IndexResponse ¶
Click to show internal directories.
Click to hide internal directories.