provider

package
v0.0.0-...-5f64e5d Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NoSuchFileErr = errors.New("no such file or directory")
	NotMapDevice  = errors.New("not a mapped image or snapshot")
)

Functions

This section is empty.

Types

type CephProvider

type CephProvider struct {
	// contains filtered or unexported fields
}

func NewCephProvider

func NewCephProvider(timeout int, poolName string) *CephProvider

func (*CephProvider) Attach

func (c *CephProvider) Attach(ctx context.Context, volId string) (string, error)

func (*CephProvider) CreateVolume

func (c *CephProvider) CreateVolume(ctx context.Context, volId string, size int64) (string, error)

func (*CephProvider) DeleteVolume

func (c *CephProvider) DeleteVolume(ctx context.Context, volId string) error

func (*CephProvider) Detach

func (c *CephProvider) Detach(ctx context.Context, volId string) error

func (*CephProvider) GetDetail

func (c *CephProvider) GetDetail() string

func (*CephProvider) GetImageName

func (c *CephProvider) GetImageName(volId string) string

func (*CephProvider) GetMapDevice

func (c *CephProvider) GetMapDevice(volId string) (string, error)

func (*CephProvider) GetVolumeType

func (c *CephProvider) GetVolumeType() VolumeType

func (*CephProvider) HasVolume

func (c *CephProvider) HasVolume(volId string) (bool, error)

func (*CephProvider) Resize

func (c *CephProvider) Resize(volId string, size int64) error

type VolumeProvider

type VolumeProvider interface {
	GetVolumeType() VolumeType
	GetDetail() string
	CreateVolume(ctx context.Context, volId string, size int64) (string, error)
	DeleteVolume(ctx context.Context, volId string) error
	Attach(ctx context.Context, volId string) (string, error)
	Detach(ctx context.Context, volId string) error
	Resize(volId string, size int64) error
	GetMapDevice(volId string) (string, error)
	HasVolume(volId string) (bool, error)
}

type VolumeType

type VolumeType string
const (
	CephType VolumeType = "ceph"
)

Jump to

Keyboard shortcuts

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