Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Controller = "CONTROLLER"
	Satellite  = "SATELLITE"
	Online     = "ONLINE"
)

Various lapi consts yet to be defined in golinstor.

Variables

This section is empty.

Functions

This section is empty.

Types

type HighLevelClient

type HighLevelClient struct {
	lapi.Client
}

HighLevelClient is a golinstor client with convience functions.

func NewHighLevelClient

func NewHighLevelClient(options ...func(*lapi.Client) error) (*HighLevelClient, error)

NewHighLevelClient returns a pointer to a golinstor client with convience.

func NewHighLevelLinstorClientForObject

func NewHighLevelLinstorClientForObject(obj metav1.Object) (*HighLevelClient, error)

NewHighLevelLinstorClientForObject configures a HighLevelClient with an in-cluster url based on the controller's service naming convention.

func (*HighLevelClient) GetAllResourcesOnNode

func (c *HighLevelClient) GetAllResourcesOnNode(ctx context.Context, nodeName string) ([]lapi.ResourceWithVolumes, error)

GetAllResourcesOnNode returns a list of all resources on the specified node.

func (*HighLevelClient) GetAllStorageNodes

func (c *HighLevelClient) GetAllStorageNodes(ctx context.Context) ([]StorageNode, error)

GetAllStorageNodes returns a list of all Satellite nodes with a list of their storage pools.

func (*HighLevelClient) GetNodeOrCreate

func (c *HighLevelClient) GetNodeOrCreate(ctx context.Context, node lapi.Node) (lapi.Node, error)

GetNodeOrCreate gets a linstor node, creating it if it is not already present.

func (*HighLevelClient) GetStoragePoolOrCreateOnNode

func (c *HighLevelClient) GetStoragePoolOrCreateOnNode(ctx context.Context, pool lapi.StoragePool, nodeName string) (lapi.StoragePool, error)

GetStoragePoolOrCreateOnNode gets a linstor storage pool, creating it on the node if it is not already present.

type StorageNode

type StorageNode struct {
	lapi.Node
	StoragePools []lapi.StoragePool
}

StorageNode is a linstor node with its respective storage pools.

Jump to

Keyboard shortcuts

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