highlevelclient

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HighLevelClient

type HighLevelClient struct {
	*lapi.Client
	PropertyNamespace string
}

HighLevelClient is a golinstor client with convience functions.

func NewHighLevelClient

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

NewHighLevelClient returns a pointer to a golinstor client with convience.

func (*HighLevelClient) GenericAccessibleTopologies

func (c *HighLevelClient) GenericAccessibleTopologies(ctx context.Context, volId string, remoteAccessPolicy volume.RemoteAccessPolicy) ([]*csi.Topology, error)

GenericAccessibleTopologies returns topologies based on linstor storage pools and whether a resource is allowed to be accessed over the network.

func (*HighLevelClient) GetAllTopologyNodes added in v0.18.0

func (c *HighLevelClient) GetAllTopologyNodes(ctx context.Context, remoteAccessPolicy volume.RemoteAccessPolicy, requisites []*csi.Topology) ([]string, error)

GetAllTopologyNodes returns the list of nodes that satisfy the given topology requirements

func (*HighLevelClient) NodesForTopology added in v0.15.1

func (c *HighLevelClient) NodesForTopology(ctx context.Context, segments map[string]string) ([]string, error)

NodesForTopology finds all matching nodes for the given topology segment.

In the most common case, this just extracts the node name using the standard topology.LinstorNodeKey. In some cases CSI only gives us an "aggregate" topology, i.e. no node name, just some common property, in which case we query the LINSTOR API for all matching nodes.

func (*HighLevelClient) ReservedCapacity added in v1.3.0

func (c *HighLevelClient) ReservedCapacity(ctx context.Context, node, pool string) (int64, error)

Jump to

Keyboard shortcuts

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