Documentation
¶
Index ¶
- func New() resource.Driver
- type LVDriver
- type LVDriverProvisioner
- type LVDriverResizer
- type LVDriverUnprovisioner
- type LVDriverWiper
- type T
- func (t *T) Boot(ctx context.Context) error
- func (t *T) ClaimedDevices(ctx context.Context) device.L
- func (t *T) CurrentSize(ctx context.Context) (int64, error)
- func (t *T) DriverID() driver.ID
- func (t *T) ExposedDevices(ctx context.Context) device.L
- func (t *T) Info(ctx context.Context) (resource.InfoKeys, error)
- func (t *T) Label(_ context.Context) string
- func (t *T) Manifest() *manifest.T
- func (t *T) PoolCharge() (string, int64)
- func (t *T) ProvisionAsLeader(ctx context.Context) error
- func (t *T) Provisioned(ctx context.Context) (provisioned.T, error)
- func (t *T) Resize(ctx context.Context, to int64) error
- func (t *T) ResizePlan(ctx context.Context, to int64) (int64, error)
- func (t *T) ResizeRestsOn(_ context.Context) string
- func (t *T) Start(ctx context.Context) error
- func (t *T) Status(ctx context.Context) status.T
- func (t *T) Stop(ctx context.Context) error
- func (t *T) SubDevices(ctx context.Context) device.L
- func (t *T) UnprovisionAsLeader(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LVDriverProvisioner ¶
type LVDriverResizer ¶
type LVDriverResizer interface {
Size(context.Context) (int64, error)
Resize(context.Context, int64) error
}
LVDriverResizer is implemented by the lv implementations that can report and change their size. A resource whose implementation does not is refused when a resize is planned, not when it is applied.
type LVDriverUnprovisioner ¶
type LVDriverWiper ¶
type T ¶
type T struct {
resdisk.T
LVName string `json:"name"`
VGName string `json:"vg"`
Size string `json:"size"`
CreateOptions []string `json:"create_options"`
}
func (*T) CurrentSize ¶
CurrentSize implements resource.Sizer.
func (*T) Label ¶
Label implements Label from resource.Driver interface, it returns a formatted short description of the Resource
func (*T) PoolCharge ¶
PoolCharge implements resource.PoolCharger. A logical volume takes its size of the volume group it is carved from.
A size that is a share of the group, "100%FREE" and the like, is not a number the group can be rationed by, and is answered as none.
func (*T) Provisioned ¶
func (*T) ResizePlan ¶
ResizePlan implements resource.Resizer.
A logical volume holds what it is given, so it asks the volume group below it for the same size.
func (*T) ResizeRestsOn ¶
ResizeRestsOn implements resource.ResizeRestsOn.
A logical volume takes its space from its volume group, which no device leads to: what a volume group exposes is the logical volumes themselves.