Documentation ¶
Index ¶
- Constants
- type PoolExpansion
- func (p *PoolExpansion) Build() (*PoolExpansion, error)
- func (p *PoolExpansion) Execute() ([]byte, error)
- func (p *PoolExpansion) GetCommand() string
- func (p *PoolExpansion) GetPool() string
- func (p *PoolExpansion) GetProperty() []string
- func (p *PoolExpansion) GetVdevList() []string
- func (p *PoolExpansion) SetCommand(Command string)
- func (p *PoolExpansion) SetPool(Pool string)
- func (p *PoolExpansion) SetProperty(key, value string)
- func (p *PoolExpansion) SetVdev(Vdev string)
- func (p *PoolExpansion) Validate() *PoolExpansion
- func (p *PoolExpansion) WithCheck(check ...PredicateFunc) *PoolExpansion
- func (p *PoolExpansion) WithCommand(Command string) *PoolExpansion
- func (p *PoolExpansion) WithDeviceType(DeviceType string) *PoolExpansion
- func (p *PoolExpansion) WithExecutor(executor bin.Executor) *PoolExpansion
- func (p *PoolExpansion) WithForcefully(Forcefully bool) *PoolExpansion
- func (p *PoolExpansion) WithPool(Pool string) *PoolExpansion
- func (p *PoolExpansion) WithProperty(key, value string) *PoolExpansion
- func (p *PoolExpansion) WithType(Type string) *PoolExpansion
- func (p *PoolExpansion) WithVdevList(vdevlist []string) *PoolExpansion
- type PredicateFunc
Constants ¶
const (
// Operation defines type of zfs operation
Operation = "add"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PoolExpansion ¶
type PoolExpansion struct { // list of vdev to add VdevList []string // property list Property []string // name of pool Pool string // Forcefully .. with -f Forcefully bool // command string Command string // DeviceType DeviceType string // Type of config.. like mirror Type string // Executor is to execute the commands Executor bin.Executor // contains filtered or unexported fields }
PoolExpansion defines structure for pool 'Expansion' operation
func NewPoolExpansion ¶
func NewPoolExpansion() *PoolExpansion
NewPoolExpansion returns new instance of object PoolExpansion
func (*PoolExpansion) Build ¶
func (p *PoolExpansion) Build() (*PoolExpansion, error)
Build returns the PoolExpansion object generated by builder
func (*PoolExpansion) Execute ¶
func (p *PoolExpansion) Execute() ([]byte, error)
Execute is to execute generated PoolCreate object
func (*PoolExpansion) GetCommand ¶
func (p *PoolExpansion) GetCommand() string
GetCommand method get the Command field of PoolExpansion object.
func (*PoolExpansion) GetPool ¶
func (p *PoolExpansion) GetPool() string
GetPool method get the Pool field of PoolExpansion object.
func (*PoolExpansion) GetProperty ¶
func (p *PoolExpansion) GetProperty() []string
GetProperty method get the Property field of PoolExpansion object.
func (*PoolExpansion) GetVdevList ¶
func (p *PoolExpansion) GetVdevList() []string
GetVdevList method get the VdevList field of PoolExpansion object.
func (*PoolExpansion) SetCommand ¶
func (p *PoolExpansion) SetCommand(Command string)
SetCommand method set the Command field of PoolExpansion object.
func (*PoolExpansion) SetPool ¶
func (p *PoolExpansion) SetPool(Pool string)
SetPool method set the Pool field of PoolExpansion object.
func (*PoolExpansion) SetProperty ¶
func (p *PoolExpansion) SetProperty(key, value string)
SetProperty method set the Property field of PoolExpansion object.
func (*PoolExpansion) SetVdev ¶
func (p *PoolExpansion) SetVdev(Vdev string)
SetVdev method set the VdevList field of PoolExpansion object.
func (*PoolExpansion) Validate ¶
func (p *PoolExpansion) Validate() *PoolExpansion
Validate is to validate generated PoolExpansion object by builder
func (*PoolExpansion) WithCheck ¶
func (p *PoolExpansion) WithCheck(check ...PredicateFunc) *PoolExpansion
WithCheck add given check to checks list
func (*PoolExpansion) WithCommand ¶
func (p *PoolExpansion) WithCommand(Command string) *PoolExpansion
WithCommand method fills the Command field of PoolExpansion object.
func (*PoolExpansion) WithDeviceType ¶
func (p *PoolExpansion) WithDeviceType(DeviceType string) *PoolExpansion
WithDeviceType method fills the DeviceType field of PoolExpansion object.
func (*PoolExpansion) WithExecutor ¶ added in v1.11.0
func (p *PoolExpansion) WithExecutor(executor bin.Executor) *PoolExpansion
WithExecutor method fills the Executor field of PoolExpansion object.
func (*PoolExpansion) WithForcefully ¶
func (p *PoolExpansion) WithForcefully(Forcefully bool) *PoolExpansion
WithForcefully method fills the Forcefully field of PoolExpansion object.
func (*PoolExpansion) WithPool ¶
func (p *PoolExpansion) WithPool(Pool string) *PoolExpansion
WithPool method fills the Pool field of PoolExpansion object.
func (*PoolExpansion) WithProperty ¶
func (p *PoolExpansion) WithProperty(key, value string) *PoolExpansion
WithProperty method fills the Property field of PoolExpansion object.
func (*PoolExpansion) WithType ¶
func (p *PoolExpansion) WithType(Type string) *PoolExpansion
WithType method fills the Type field of PoolExpansion object.
func (*PoolExpansion) WithVdevList ¶
func (p *PoolExpansion) WithVdevList(vdevlist []string) *PoolExpansion
WithVdevList method fills the VdevList field of PoolExpansion object.
type PredicateFunc ¶
type PredicateFunc func(*PoolExpansion) bool
PredicateFunc defines data-type for validation function
func IsCommandSet ¶
func IsCommandSet() PredicateFunc
IsCommandSet method check if the Command field of PoolExpansion object is set.
func IsDeviceTypeSet ¶
func IsDeviceTypeSet() PredicateFunc
IsDeviceTypeSet method check if the DeviceType field of PoolExpansion object is set.
func IsExecutorSet ¶ added in v1.11.0
func IsExecutorSet() PredicateFunc
IsExecutorSet method check if the Executor field of PoolExpansion object is set.
func IsForcefullySet ¶
func IsForcefullySet() PredicateFunc
IsForcefullySet method check if the Forcefully field of PoolExpansion object is set.
func IsPoolSet ¶
func IsPoolSet() PredicateFunc
IsPoolSet method check if the Pool field of PoolExpansion object is set.
func IsPropertySet ¶
func IsPropertySet() PredicateFunc
IsPropertySet method check if the Property field of PoolExpansion object is set.
func IsTypeSet ¶
func IsTypeSet() PredicateFunc
IsTypeSet method check if the Type field of PoolExpansion object is set.
func IsVdevListSet ¶
func IsVdevListSet() PredicateFunc
IsVdevListSet method check if the VdevList field of PoolExpansion object is set.