Documentation
¶
Index ¶
- Constants
- type HighLevelClient
- func (c *HighLevelClient) GetAllResourcesOnNode(ctx context.Context, nodeName string) ([]lapi.ResourceWithVolumes, error)
- func (c *HighLevelClient) GetAllStorageNodes(ctx context.Context) ([]StorageNode, error)
- func (c *HighLevelClient) GetNodeOrCreate(ctx context.Context, node lapi.Node) (lapi.Node, error)
- func (c *HighLevelClient) GetStoragePoolOrCreateOnNode(ctx context.Context, pool lapi.StoragePool, nodeName string) (lapi.StoragePool, error)
- type StorageNode
Constants ¶
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 ¶
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 ¶
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.