Documentation ¶
Index ¶
- Constants
- type PoolOnline
- func (p *PoolOnline) Build() (*PoolOnline, error)
- func (p *PoolOnline) Execute() ([]byte, error)
- func (p *PoolOnline) GetCommand() string
- func (p *PoolOnline) GetDevice() []string
- func (p *PoolOnline) GetPool() string
- func (p *PoolOnline) GetShouldExpand() bool
- func (p *PoolOnline) SetCommand(Command string)
- func (p *PoolOnline) SetDevice(dev string)
- func (p *PoolOnline) SetPool(Pool string)
- func (p *PoolOnline) SetShouldExpand(ShouldExpand bool)
- func (p *PoolOnline) Validate() *PoolOnline
- func (p *PoolOnline) WithCheck(check ...PredicateFunc) *PoolOnline
- func (p *PoolOnline) WithCommand(Command string) *PoolOnline
- func (p *PoolOnline) WithDevice(dev string) *PoolOnline
- func (p *PoolOnline) WithExecutor(executor bin.Executor) *PoolOnline
- func (p *PoolOnline) WithPool(Pool string) *PoolOnline
- func (p *PoolOnline) WithShouldExpand(ShouldExpand bool) *PoolOnline
- type PredicateFunc
Constants ¶
const (
// Operation defines type of zfs operation
Operation = "online"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PoolOnline ¶
type PoolOnline struct { //pool name Pool string //device list Device []string //expand the device to use all available space ShouldExpand bool // command string Command string // Executor is to execute the commands Executor bin.Executor // contains filtered or unexported fields }
PoolOnline defines structure for pool 'Online' operation
func NewPoolOnline ¶
func NewPoolOnline() *PoolOnline
NewPoolOnline returns new instance of object PoolOnline
func (*PoolOnline) Build ¶
func (p *PoolOnline) Build() (*PoolOnline, error)
Build returns the PoolOnline object generated by builder
func (*PoolOnline) Execute ¶
func (p *PoolOnline) Execute() ([]byte, error)
Execute is to execute generated PoolOnline object
func (*PoolOnline) GetCommand ¶
func (p *PoolOnline) GetCommand() string
GetCommand method get the Command field of PoolOnline object.
func (*PoolOnline) GetDevice ¶
func (p *PoolOnline) GetDevice() []string
GetDevice method get the Device field of PoolOnline object.
func (*PoolOnline) GetPool ¶
func (p *PoolOnline) GetPool() string
GetPool method get the Pool field of PoolOnline object.
func (*PoolOnline) GetShouldExpand ¶
func (p *PoolOnline) GetShouldExpand() bool
GetShouldExpand method get the ShouldExpand field of PoolOnline object.
func (*PoolOnline) SetCommand ¶
func (p *PoolOnline) SetCommand(Command string)
SetCommand method set the Command field of PoolOnline object.
func (*PoolOnline) SetDevice ¶
func (p *PoolOnline) SetDevice(dev string)
SetDevice method set the Device field of PoolOnline object.
func (*PoolOnline) SetPool ¶
func (p *PoolOnline) SetPool(Pool string)
SetPool method set the Pool field of PoolOnline object.
func (*PoolOnline) SetShouldExpand ¶
func (p *PoolOnline) SetShouldExpand(ShouldExpand bool)
SetShouldExpand method set the ShouldExpand field of PoolOnline object.
func (*PoolOnline) Validate ¶
func (p *PoolOnline) Validate() *PoolOnline
Validate is to validate generated PoolOnline object by builder
func (*PoolOnline) WithCheck ¶
func (p *PoolOnline) WithCheck(check ...PredicateFunc) *PoolOnline
WithCheck add given check to checks list
func (*PoolOnline) WithCommand ¶
func (p *PoolOnline) WithCommand(Command string) *PoolOnline
WithCommand method fills the Command field of PoolOnline object.
func (*PoolOnline) WithDevice ¶
func (p *PoolOnline) WithDevice(dev string) *PoolOnline
WithDevice method fills the Device field of PoolOnline object.
func (*PoolOnline) WithExecutor ¶ added in v1.11.0
func (p *PoolOnline) WithExecutor(executor bin.Executor) *PoolOnline
WithExecutor method fills the Executor field of PoolOnline object.
func (*PoolOnline) WithPool ¶
func (p *PoolOnline) WithPool(Pool string) *PoolOnline
WithPool method fills the Pool field of PoolOnline object.
func (*PoolOnline) WithShouldExpand ¶
func (p *PoolOnline) WithShouldExpand(ShouldExpand bool) *PoolOnline
WithShouldExpand method fills the ShouldExpand field of PoolOnline object.
type PredicateFunc ¶
type PredicateFunc func(*PoolOnline) bool
PredicateFunc defines data-type for validation function
func IsCommandSet ¶
func IsCommandSet() PredicateFunc
IsCommandSet method check if the Command field of PoolOnline object is set.
func IsDeviceSet ¶
func IsDeviceSet() PredicateFunc
IsDeviceSet method check if the Device field of PoolOnline object is set.
func IsExecutorSet ¶ added in v1.11.0
func IsExecutorSet() PredicateFunc
IsExecutorSet method check if the Executor field of PoolOnline object is set.
func IsPoolSet ¶
func IsPoolSet() PredicateFunc
IsPoolSet method check if the Pool field of PoolOnline object is set.
func IsShouldExpandSet ¶
func IsShouldExpandSet() PredicateFunc
IsShouldExpandSet method check if the ShouldExpand field of PoolOnline object is set.