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)
- func (c *HighLevelClient) ReservedCapacity(ctx context.Context, node, pool string) (int64, error)
- type NodeCacheProvider
- type ResourceCacheProvider
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, 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
type NodeCacheProvider ¶ added in v1.2.3
type NodeCacheProvider struct { lapi.NodeProvider // contains filtered or unexported fields }
func (*NodeCacheProvider) GetStoragePoolView ¶ added in v1.2.3
func (n *NodeCacheProvider) GetStoragePoolView(ctx context.Context, opts ...*lapi.ListOpts) ([]lapi.StoragePool, error)
type ResourceCacheProvider ¶ added in v1.3.0
type ResourceCacheProvider struct { lapi.ResourceProvider // contains filtered or unexported fields }
func (*ResourceCacheProvider) GetResourceView ¶ added in v1.3.0
func (r *ResourceCacheProvider) GetResourceView(ctx context.Context, opts ...*lapi.ListOpts) ([]lapi.ResourceWithVolumes, error)