Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
- func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, 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 CreateResponse
- type DeleteRequest
- type DeleteResponse
- 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 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 a ZFS pool.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
Delete Destroy a ZFS pool.
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 *bool `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 *string `url:"draid-config,omitempty",json:"draid-config,omitempty"` }
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 FindRequest ¶
type FindResponse ¶
type FindResponse struct { 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"` } `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.