Documentation ¶
Index ¶
- Variables
- type LogicalVolumeService
- func (s *LogicalVolumeService) CreateVolume(ctx context.Context, node, dc, name string, requestGb int64) (string, error)
- func (s *LogicalVolumeService) DeleteVolume(ctx context.Context, volumeID string) error
- func (s *LogicalVolumeService) ExpandVolume(ctx context.Context, volumeID string, requestGb int64) error
- func (s *LogicalVolumeService) GetVolume(ctx context.Context, volumeID string) (*topolvmv1.LogicalVolume, error)
- func (s *LogicalVolumeService) UpdateCurrentSize(ctx context.Context, volumeID string, size *resource.Quantity) error
- func (s *LogicalVolumeService) UpdateSpecSize(ctx context.Context, volumeID string, size *resource.Quantity) error
- type NodeService
- func (s NodeService) GetCapacityByName(ctx context.Context, name, deviceClass string) (int64, error)
- func (s NodeService) GetCapacityByTopologyLabel(ctx context.Context, topology, dc string) (int64, error)
- func (s NodeService) GetMaxCapacity(ctx context.Context, deviceClass string) (string, int64, error)
- func (s NodeService) GetTotalCapacity(ctx context.Context, dc string) (int64, error)
Constants ¶
This section is empty.
Variables ¶
var ErrNodeNotFound = errors.New("node not found")
ErrNodeNotFound represents the error that node is not found.
var ErrVolumeNotFound = errors.New("VolumeID is not found")
ErrVolumeNotFound represents the specified volume is not found.
Functions ¶
This section is empty.
Types ¶
type LogicalVolumeService ¶ added in v0.4.0
LogicalVolumeService represents service for LogicalVolume.
func NewLogicalVolumeService ¶
func NewLogicalVolumeService(mgr manager.Manager) (*LogicalVolumeService, error)
NewLogicalVolumeService returns LogicalVolumeService.
func (*LogicalVolumeService) CreateVolume ¶ added in v0.4.0
func (s *LogicalVolumeService) CreateVolume(ctx context.Context, node, dc, name string, requestGb int64) (string, error)
CreateVolume creates volume
func (*LogicalVolumeService) DeleteVolume ¶ added in v0.4.0
func (s *LogicalVolumeService) DeleteVolume(ctx context.Context, volumeID string) error
DeleteVolume deletes volume
func (*LogicalVolumeService) ExpandVolume ¶ added in v0.4.0
func (s *LogicalVolumeService) ExpandVolume(ctx context.Context, volumeID string, requestGb int64) error
ExpandVolume expands volume
func (*LogicalVolumeService) GetVolume ¶ added in v0.4.0
func (s *LogicalVolumeService) GetVolume(ctx context.Context, volumeID string) (*topolvmv1.LogicalVolume, error)
GetVolume returns LogicalVolume by volume ID.
func (*LogicalVolumeService) UpdateCurrentSize ¶ added in v0.4.0
func (s *LogicalVolumeService) UpdateCurrentSize(ctx context.Context, volumeID string, size *resource.Quantity) error
UpdateCurrentSize updates .Status.CurrentSize of LogicalVolume.
func (*LogicalVolumeService) UpdateSpecSize ¶ added in v0.4.0
func (s *LogicalVolumeService) UpdateSpecSize(ctx context.Context, volumeID string, size *resource.Quantity) error
UpdateSpecSize updates .Spec.Size of LogicalVolume.
type NodeService ¶ added in v0.4.0
NodeService represents node service.
func NewNodeService ¶ added in v0.4.0
func NewNodeService(mgr manager.Manager) *NodeService
NewNodeService returns NodeService.
func (NodeService) GetCapacityByName ¶ added in v0.4.0
func (s NodeService) GetCapacityByName(ctx context.Context, name, deviceClass string) (int64, error)
GetCapacityByName returns VG capacity of specified node by name.
func (NodeService) GetCapacityByTopologyLabel ¶ added in v0.4.0
func (s NodeService) GetCapacityByTopologyLabel(ctx context.Context, topology, dc string) (int64, error)
GetCapacityByTopologyLabel returns VG capacity of specified node by TopoLVM's topology label.
func (NodeService) GetMaxCapacity ¶ added in v0.4.0
GetMaxCapacity returns max VG capacity among nodes.
func (NodeService) GetTotalCapacity ¶ added in v0.4.0
GetTotalCapacity returns total VG capacity of all nodes.