pclear

package
v1.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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) Build

func (p *PoolClear) Build() (*PoolClear, error)

Build returns the PoolClear object generated by builder

func (*PoolClear) Execute

func (p *PoolClear) Execute() ([]byte, error)

Execute is to execute generated PoolClear object

func (*PoolClear) GetCommand

func (p *PoolClear) GetCommand() string

GetCommand method get the Command field of PoolClear object.

func (*PoolClear) GetPool

func (p *PoolClear) GetPool() string

GetPool method get the Pool field of PoolClear object.

func (*PoolClear) GetVdev

func (p *PoolClear) GetVdev() []string

GetVdev method get the Vdev field of PoolClear object.

func (*PoolClear) SetCommand

func (p *PoolClear) SetCommand(Command string)

SetCommand method set the Command field of PoolClear object.

func (*PoolClear) SetPool

func (p *PoolClear) SetPool(Pool string)

SetPool method set the Pool field of PoolClear object.

func (*PoolClear) SetVdev

func (p *PoolClear) SetVdev(Vdev string)

SetVdev method set the Vdev field of PoolClear object.

func (*PoolClear) Validate

func (p *PoolClear) Validate() *PoolClear

Validate is to validate generated PoolClear object by builder

func (*PoolClear) WithCheck

func (p *PoolClear) WithCheck(check ...PredicateFunc) *PoolClear

WithCheck add given check to checks list

func (*PoolClear) WithCommand

func (p *PoolClear) WithCommand(Command string) *PoolClear

WithCommand method fills the Command field of PoolClear object.

func (*PoolClear) WithExecutor added in v1.11.0

func (p *PoolClear) WithExecutor(executor bin.Executor) *PoolClear

WithExecutor method fills the Executor field of PoolClear object.

func (*PoolClear) WithPool

func (p *PoolClear) WithPool(Pool string) *PoolClear

WithPool method fills the Pool field of PoolClear object.

func (*PoolClear) WithVdev

func (p *PoolClear) WithVdev(vdev string) *PoolClear

WithVdev method fills the Vdev field of PoolClear object.

type PredicateFunc

type PredicateFunc func(*PoolClear) bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL