ponline

package
v1.11.0-RC1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
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
	// 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) 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 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.

Jump to

Keyboard shortcuts

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