padd

package
v1.12.1-RC1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Operation defines type of zfs operation
	Operation = "replace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PoolDiskReplace

type PoolDiskReplace struct {
	// Vdev to be replaced
	OldVdev string

	// New Vdev
	NewVdev string

	// property list
	Property []string

	// name of pool
	Pool string

	// Forcefully .. with -f
	Forcefully bool

	// command string
	Command string
	// contains filtered or unexported fields
}

PoolDiskReplace defines structure for pool 'Disk Replace' operation

func NewPoolDiskReplace

func NewPoolDiskReplace() *PoolDiskReplace

NewPoolDiskReplace returns new instance of object PoolDiskReplace

func (*PoolDiskReplace) Build

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

Build returns the PoolDiskReplace object generated by builder

func (*PoolDiskReplace) Execute

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

Execute is to execute generated PoolDiskReplace object

func (*PoolDiskReplace) GetCommand

func (p *PoolDiskReplace) GetCommand() string

GetCommand method get the Command field of PoolDiskReplace object.

func (*PoolDiskReplace) GetPool

func (p *PoolDiskReplace) GetPool() string

GetPool method get the Pool field of PoolDiskReplace object.

func (*PoolDiskReplace) GetProperty

func (p *PoolDiskReplace) GetProperty() []string

GetProperty method get the Property field of PoolDiskReplace object.

func (*PoolDiskReplace) SetCommand

func (p *PoolDiskReplace) SetCommand(Command string)

SetCommand method set the Command field of PoolDiskReplace object.

func (*PoolDiskReplace) SetNewVdev

func (p *PoolDiskReplace) SetNewVdev(NewVdev string)

SetNewVdev method set the NewVdev field of PoolDiskReplace object.

func (*PoolDiskReplace) SetOldVdev

func (p *PoolDiskReplace) SetOldVdev(OldVdev string)

SetOldVdev method set the OldVdev field of PoolDiskReplace object.

func (*PoolDiskReplace) SetPool

func (p *PoolDiskReplace) SetPool(Pool string)

SetPool method set the Pool field of PoolDiskReplace object.

func (*PoolDiskReplace) SetProperty

func (p *PoolDiskReplace) SetProperty(key, value string)

SetProperty method set the Property field of PoolDiskReplace object.

func (*PoolDiskReplace) Validate

func (p *PoolDiskReplace) Validate() *PoolDiskReplace

Validate is to validate generated PoolDiskReplace object by builder

func (*PoolDiskReplace) WithCheck

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

WithCheck add given check to checks list

func (*PoolDiskReplace) WithCommand

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

WithCommand method fills the Command field of PoolDiskReplace object.

func (*PoolDiskReplace) WithForcefully

func (p *PoolDiskReplace) WithForcefully(Forcefully bool) *PoolDiskReplace

WithForcefully method fills the Forcefully field of PoolDiskReplace object.

func (*PoolDiskReplace) WithNewVdev

func (p *PoolDiskReplace) WithNewVdev(NewVdev string) *PoolDiskReplace

WithNewVdev method fills the NewVdev field of PoolDiskReplace object.

func (*PoolDiskReplace) WithOldVdev

func (p *PoolDiskReplace) WithOldVdev(OldVdev string) *PoolDiskReplace

WithOldVdev method fills the OldVdev field of PoolDiskReplace object.

func (*PoolDiskReplace) WithPool

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

WithPool method fills the Pool field of PoolDiskReplace object.

func (*PoolDiskReplace) WithProperty

func (p *PoolDiskReplace) WithProperty(key, value string) *PoolDiskReplace

WithProperty method fills the Property field of PoolDiskReplace object.

type PredicateFunc

type PredicateFunc func(*PoolDiskReplace) bool

PredicateFunc defines data-type for validation function

func IsCommandSet

func IsCommandSet() PredicateFunc

IsCommandSet method check if the Command field of PoolDiskReplace object is set.

func IsForcefullySet

func IsForcefullySet() PredicateFunc

IsForcefullySet method check if the Forcefully field of PoolDiskReplace object is set.

func IsNewVdevSet

func IsNewVdevSet() PredicateFunc

IsNewVdevSet method check if the NewVdev field of PoolDiskReplace object is set.

func IsOldVdevSet

func IsOldVdevSet() PredicateFunc

IsOldVdevSet method check if the OldVdev field of PoolDiskReplace object is set.

func IsPoolSet

func IsPoolSet() PredicateFunc

IsPoolSet method check if the Pool field of PoolDiskReplace object is set.

func IsPropertySet

func IsPropertySet() PredicateFunc

IsPropertySet method check if the Property field of PoolDiskReplace object is set.

Jump to

Keyboard shortcuts

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