Documentation ¶
Index ¶
- Constants
- 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 Compression
- type CreateRequest
- type DeleteRequest
- type DraidConfig
- type FindRequest
- type FindResponse
- type HTTPClient
- type IndexRequest
- type IndexResponse
- type Raidlevel
Constants ¶
View Source
const ( Compression_ON Compression = "on" Compression_OFF Compression = "off" Compression_GZIP Compression = "gzip" Compression_LZ4 Compression = "lz4" Compression_LZJB Compression = "lzjb" Compression_ZLE Compression = "zle" Compression_ZSTD Compression = "zstd" Raidlevel_SINGLE Raidlevel = "single" Raidlevel_MIRROR Raidlevel = "mirror" Raidlevel_RAID10 Raidlevel = "raid10" Raidlevel_RAIDZ Raidlevel = "raidz" Raidlevel_RAIDZ2 Raidlevel = "raidz2" Raidlevel_RAIDZ3 Raidlevel = "raidz3" Raidlevel_DRAID Raidlevel = "draid" Raidlevel_DRAID2 Raidlevel = "draid2" Raidlevel_DRAID3 Raidlevel = "draid3" )
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 Compression ¶ added in v0.0.15
type Compression string
func PtrCompression ¶ added in v0.0.15
func PtrCompression(i Compression) *Compression
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 Raidlevel `url:"raidlevel" json:"raidlevel"` // The RAID level to use. // The following parameters are optional AddStorage *util.PVEBool `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 *Compression `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.PVEBool `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.PVEBool `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
func (*DraidConfig) UnmarshalJSON ¶ added in v0.0.19
func (t *DraidConfig) UnmarshalJSON(d []byte) 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.