Documentation ¶
Index ¶
- Constants
- type PoolClear
- func (p *PoolClear) Build() (*PoolClear, error)
- func (p *PoolClear) Execute() ([]byte, error)
- func (p *PoolClear) GetCommand() string
- func (p *PoolClear) GetPool() string
- func (p *PoolClear) GetVdev() []string
- func (p *PoolClear) SetCommand(Command string)
- func (p *PoolClear) SetPool(Pool string)
- func (p *PoolClear) SetVdev(Vdev string)
- func (p *PoolClear) Validate() *PoolClear
- func (p *PoolClear) WithCheck(check ...PredicateFunc) *PoolClear
- func (p *PoolClear) WithCommand(Command string) *PoolClear
- func (p *PoolClear) WithExecutor(executor bin.Executor) *PoolClear
- func (p *PoolClear) WithPool(Pool string) *PoolClear
- func (p *PoolClear) WithVdev(vdev string) *PoolClear
- type PredicateFunc
Constants ¶
const (
// Operation defines type of zfs operation
Operation = "clear"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PoolClear ¶
type PoolClear struct { // pool name Pool string // vdev list Vdev []string // command string Command string // Executor is to execute the commands Executor bin.Executor // contains filtered or unexported fields }
PoolClear defines structure for pool 'Clear' operation
func NewPoolClear ¶
func NewPoolClear() *PoolClear
NewPoolClear returns new instance of object PoolClear
func (*PoolClear) GetCommand ¶
GetCommand method get the Command field of PoolClear object.
func (*PoolClear) SetCommand ¶
SetCommand method set the Command field of PoolClear object.
func (*PoolClear) WithCheck ¶
func (p *PoolClear) WithCheck(check ...PredicateFunc) *PoolClear
WithCheck add given check to checks list
func (*PoolClear) WithCommand ¶
WithCommand method fills the Command field of PoolClear object.
func (*PoolClear) WithExecutor ¶ added in v1.11.0
WithExecutor method fills the Executor field of PoolClear object.
type PredicateFunc ¶
PredicateFunc defines data-type for validation function
func IsCommandSet ¶
func IsCommandSet() PredicateFunc
IsCommandSet method check if the Command field of PoolClear object is set.
func IsExecutorSet ¶ added in v1.11.0
func IsExecutorSet() PredicateFunc
IsExecutorSet method check if the Executor field of PoolClear object is set.
func IsPoolSet ¶
func IsPoolSet() PredicateFunc
IsPoolSet method check if the Pool field of PoolClear object is set.
func IsVdevSet ¶
func IsVdevSet() PredicateFunc
IsVdevSet method check if the Vdev field of PoolClear object is set.