Documentation ¶
Index ¶
- type HighLevelClient
- func (c *HighLevelClient) GenericAccessibleTopologies(ctx context.Context, volId string, ...) ([]*csi.Topology, error)
- func (c *HighLevelClient) GetAllTopologyNodes(ctx context.Context, remoteAccessPolicy volume.RemoteAccessPolicy, ...) ([]string, error)
- func (c *HighLevelClient) NodesForTopology(ctx context.Context, segments map[string]string) ([]string, error)
Constants ¶
This section is empty.
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 ...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, remoteAcecssPolicy 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.