Documentation
¶
Index ¶
- func EnoughFreeSpace(requestedKiB, replicas string) error
- func GetDevPath(r Resource, stat bool) (string, error)
- func WaitForDevPath(r Resource, maxRetries int) (string, error)
- type FSUtil
- type Resource
- func (r Resource) Assign() error
- func (r Resource) Create() error
- func (r Resource) CreateAndAssign() error
- func (r Resource) Delete() error
- func (r Resource) Exists() (bool, error)
- func (r Resource) IsClient(nodeName string) bool
- func (r Resource) OnNode(nodeName string) (bool, error)
- func (r Resource) Unassign(nodeName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnoughFreeSpace ¶
EnoughFreeSpace checks to see if there's enough free space to create a new resource.
Types ¶
type FSUtil ¶
type FSUtil struct { *Resource BlockSize int64 FSType string Force bool XFSDataSU string XFSDataSW int XFSLogDev string // contains filtered or unexported fields }
FSUtil handles creating a filesystem and mounting resources.
type Resource ¶
type Resource struct { Name string NodeName string Redundancy string NodeList []string ClientList []string AutoPlace string DoNotPlaceWithRegex string SizeKiB uint64 StoragePool string DisklessStoragePool string Encryption bool }
Resource contains all the information needed to query and assign/deploy a resource. If you're deploying a resource, Redundancy is required. If you're assigning a resource to a particular node, NodeName is required.
func (Resource) Assign ¶
Assign assigns a resource with diskfull storage to all nodes in its NodeList, then attaches the resource disklessly to all nodes in its ClientList.
func (Resource) CreateAndAssign ¶ added in v0.1.0
CreateAndAssign deploys the resource, created a new one if it doesn't exist.
Click to show internal directories.
Click to hide internal directories.