Documentation ¶
Overview ¶
Package zfsd implements a simple HTTP interface for zfs management
Index ¶
- type CloneRequest
- type DestroyRequest
- type GetRequest
- type ListRequest
- type RollbackRequest
- type SetRequest
- type SnapshotRequest
- type ZFS
- func (z *ZFS) Clone(r *http.Request, req *CloneRequest, resp *zfs.Dataset) error
- func (z *ZFS) Destroy(r *http.Request, req *DestroyRequest, resp *zfs.Dataset) error
- func (z *ZFS) Get(r *http.Request, req *GetRequest, resp *zfs.Dataset) error
- func (z *ZFS) List(r *http.Request, req *ListRequest, resp *[]*zfs.Dataset) error
- func (z *ZFS) Rollback(r *http.Request, req *RollbackRequest, resp *zfs.Dataset) error
- func (z *ZFS) Set(r *http.Request, req *SetRequest, resp *zfs.Dataset) error
- func (z *ZFS) Snapshot(r *http.Request, req *SnapshotRequest, resp *zfs.Dataset) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloneRequest ¶
type CloneRequest struct { Name string `json:"name"` Snapshot string `json:"snapshot"` Target string `json:"target"` Properties map[string]string `json:"properties,omitempty"` }
CloneRequest is used to clone a ZFS snapshot
type DestroyRequest ¶
DestroyRequest is used to destroy a ZFS dataset
type GetRequest ¶
type GetRequest struct {
Name string `json:"name"`
}
GetRequest is used to get a single ZFS dataset
type ListRequest ¶
ListRequest is used to list ZFS datasets
type RollbackRequest ¶
type RollbackRequest struct { Name string `json:"name"` Snapshot string `json:"snapshot"` Recursive bool `json:"recursive"` }
RollbackRequest is used to rollback a ZFS snapshot
type SetRequest ¶
type SetRequest struct { Name string `json:"name"` Properties map[string]string `json:"properties,omitempty"` }
SetRequest is used to set properties on a ZFS dataset
type SnapshotRequest ¶
SnapshotRequest is used to create a ZFS snapshot
type ZFS ¶
type ZFS struct { }
ZFS is used for RPC services
func (*ZFS) Clone ¶
func (z *ZFS) Clone(r *http.Request, req *CloneRequest, resp *zfs.Dataset) error
Clone clones a ZFS snapshot
func (*ZFS) Destroy ¶
func (z *ZFS) Destroy(r *http.Request, req *DestroyRequest, resp *zfs.Dataset) error
Destroy removes a ZFS dataset
func (*ZFS) Get ¶
func (z *ZFS) Get(r *http.Request, req *GetRequest, resp *zfs.Dataset) error
Get retrieves a single ZFS dataset.
func (*ZFS) List ¶
func (z *ZFS) List(r *http.Request, req *ListRequest, resp *[]*zfs.Dataset) error
List retrieves a list of all ZFS datasets, optionally only of a certain type or prefix
func (*ZFS) Rollback ¶
func (z *ZFS) Rollback(r *http.Request, req *RollbackRequest, resp *zfs.Dataset) error
Rollback rolls the given dataset to back a previous snapshot.