Documentation ¶
Index ¶
- type CloneArgs
- type CommonArgs
- type CreateArgs
- type Dataset
- type DatasetResult
- type DestroyArgs
- type ExistsResult
- type HoldsResult
- type ListArgs
- type ListResult
- type MountArgs
- type RenameArgs
- type RollbackArgs
- type SnapshotArgs
- type UnmountArgs
- type ZFS
- func (z *ZFS) Clone(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Create(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Destroy(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Exists(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Get(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Holds(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) List(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Mount(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Receive(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) RegisterTasks(server *provider.Server)
- func (z *ZFS) Rename(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Rollback(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Send(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Snapshot(req *acomm.Request) (interface{}, *url.URL, error)
- func (z *ZFS) Unmount(req *acomm.Request) (interface{}, *url.URL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloneArgs ¶
type CloneArgs struct { Name string `json:"name"` Origin string `json:"origin"` Properties map[string]interface{} `json:"properties"` }
CloneArgs are arguments for the Clone handler.
type CommonArgs ¶
type CommonArgs struct {
Name string `json:"name"` // Name of dataset
}
CommonArgs are arguments that apply to all handlers.
type CreateArgs ¶
type CreateArgs struct { Name string `json:"name"` Type string `json:"type"` // gozfs.Dataset[Filesystem,Volume] Volsize uint64 `json:"volsize"` Properties map[string]interface{} `json:"properties"` }
CreateArgs are arguments for the Create handler.
type Dataset ¶
type Dataset struct { Name string Properties *gozfs.DatasetProperties DMUObjsetStats *gozfs.DMUObjsetStats }
Dataset contains information and properties for a ZFS dataset. This struct is the same as gozfs.Dataset, except all methods that interact with ZFS have been removed. The ZFS provider should be the only place that interacts with zfs directly.
Use this struct for datasets anywhere outside the ZFS provider.
func (*Dataset) Mountpoint ¶
Mountpoint returns the resolved mountpoint of the dataset.
type DatasetResult ¶
type DatasetResult struct {
Dataset *Dataset `json:"dataset"`
}
DatasetResult is a common handler result.
type DestroyArgs ¶
type DestroyArgs struct { Name string `json:"name"` Defer bool `json:"defer"` Recursive bool `json:"recursive"` RecursiveClones bool `json:"recursive-clones"` ForceUnmount bool `json:"force-unmount"` }
DestroyArgs are arguments for the Destroy handler.
type ExistsResult ¶
type ExistsResult struct {
Exists bool `json:"exists"`
}
ExistsResult is the result data for the Exists handler.
type HoldsResult ¶
type HoldsResult struct {
Holds []string `json:"holds"`
}
HoldsResult is the result data for the Holds handler.
type ListResult ¶
type ListResult struct {
Datasets []*Dataset `json:"datasets"`
}
ListResult is the result data for the List handler.
type RenameArgs ¶
type RenameArgs struct { Name string `json:"name"` Origin string `json:"origin"` Recursive bool `json:"recursive"` }
RenameArgs are arguments for the Rename handler.
type RollbackArgs ¶
RollbackArgs are the arguments for the Rollback handler.
type SnapshotArgs ¶
type SnapshotArgs struct { Name string `json:"name"` SnapName string `json:"snapname"` Recursive bool `json:"recursive"` }
SnapshotArgs are the arguments for the Snapshot handler.
type UnmountArgs ¶
UnmountArgs are arguments for the Unmount handler.
type ZFS ¶
type ZFS struct {
// contains filtered or unexported fields
}
ZFS is a provider of zfs functionality.
func (*ZFS) Receive ¶
Receive creates a new snapshot from a zfs stream. If it a full stream, then a new filesystem or volume is created as well.
func (*ZFS) RegisterTasks ¶
RegisterTasks registers all of ZFS's task handlers with the server.