Documentation
¶
Index ¶
- Constants
- func ParseConnectionFromConf(confPath, keyringPath string) ([]string, string, error)
- func ValidateStorageClass(storageClass string) error
- type Client
- func (c *Client) Cleanup() error
- func (c *Client) CreateVolume(ctx context.Context, req VolumeRequest) error
- func (c *Client) DeleteVolume(ctx context.Context, pool, image string) error
- func (c *Client) ListVolumes(ctx context.Context, pool string) ([]string, error)
- func (c *Client) StatVolume(ctx context.Context, pool, image string) (VolumeInfo, error)
- type CommandError
- type Config
- type ExecRunner
- type FakeClient
- func (f *FakeClient) Cleanup() error
- func (f *FakeClient) CreateVolume(ctx context.Context, req VolumeRequest) error
- func (f *FakeClient) DeleteVolume(ctx context.Context, pool, image string) error
- func (f *FakeClient) ListVolumes(ctx context.Context, pool string) ([]string, error)
- func (f *FakeClient) StatVolume(ctx context.Context, pool, image string) (VolumeInfo, error)
- type Runner
- type VolumeClient
- type VolumeInfo
- type VolumeRequest
Constants ¶
View Source
const ( DefaultCephConfFile = "/etc/ceph/ceph.conf" DefaultCephKeyringFile = "/etc/ceph/ceph.client.admin.keyring" )
Variables ¶
This section is empty.
Functions ¶
func ParseConnectionFromConf ¶
func ValidateStorageClass ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateVolume ¶
func (c *Client) CreateVolume(ctx context.Context, req VolumeRequest) error
func (*Client) DeleteVolume ¶
func (*Client) ListVolumes ¶
func (*Client) StatVolume ¶
type CommandError ¶
func (CommandError) Error ¶
func (e CommandError) Error() string
func (CommandError) Unwrap ¶
func (e CommandError) Unwrap() error
type Config ¶
func DefaultConfig ¶
func DefaultConfig() Config
type ExecRunner ¶
type ExecRunner struct{}
type FakeClient ¶
type FakeClient struct {
CreateVolumeFunc func(ctx context.Context, req VolumeRequest) error
DeleteVolumeFunc func(ctx context.Context, pool, image string) error
StatVolumeFunc func(ctx context.Context, pool, image string) (VolumeInfo, error)
ListVolumesFunc func(ctx context.Context, pool string) ([]string, error)
Created []VolumeRequest
Deleted []string
Listed []string
Stated []string
}
func (*FakeClient) Cleanup ¶
func (f *FakeClient) Cleanup() error
func (*FakeClient) CreateVolume ¶
func (f *FakeClient) CreateVolume(ctx context.Context, req VolumeRequest) error
func (*FakeClient) DeleteVolume ¶
func (f *FakeClient) DeleteVolume(ctx context.Context, pool, image string) error
func (*FakeClient) ListVolumes ¶
func (*FakeClient) StatVolume ¶
func (f *FakeClient) StatVolume(ctx context.Context, pool, image string) (VolumeInfo, error)
type VolumeClient ¶
type VolumeInfo ¶
type VolumeRequest ¶
func MapVolumeToRequest ¶
func MapVolumeToRequest(volume api.Volume, cfg Config) (VolumeRequest, error)
func (VolumeRequest) ProviderVolumeID ¶
func (r VolumeRequest) ProviderVolumeID() string
Click to show internal directories.
Click to hide internal directories.