Documentation ¶
Index ¶
- type StorageProvider
- func (p *StorageProvider) DefaultPools() []*storage.Config
- func (p *StorageProvider) Dynamic() bool
- func (p *StorageProvider) FilesystemSource(providerConfig *storage.Config) (storage.FilesystemSource, error)
- func (p *StorageProvider) Scope() storage.Scope
- func (p *StorageProvider) Supports(kind storage.StorageKind) bool
- func (p *StorageProvider) ValidateConfig(providerConfig *storage.Config) error
- func (p *StorageProvider) VolumeSource(providerConfig *storage.Config) (storage.VolumeSource, error)
- type VolumeSource
- func (s *VolumeSource) AttachVolumes(params []storage.VolumeAttachmentParams) ([]storage.AttachVolumesResult, error)
- func (s *VolumeSource) CreateVolumes(params []storage.VolumeParams) ([]storage.CreateVolumesResult, error)
- func (s *VolumeSource) DescribeVolumes(volIds []string) ([]storage.DescribeVolumesResult, error)
- func (s *VolumeSource) DestroyVolumes(volIds []string) ([]error, error)
- func (s *VolumeSource) DetachVolumes(params []storage.VolumeAttachmentParams) ([]error, error)
- func (s *VolumeSource) ListVolumes() ([]string, error)
- func (s *VolumeSource) ValidateVolumeParams(params storage.VolumeParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageProvider ¶
type StorageProvider struct { testing.Stub // StorageScope defines the scope of storage managed by this provider. StorageScope storage.Scope // IsDynamic defines whether or not the provider reports that it supports // dynamic provisioning. IsDynamic bool // DefaultPools_ will be returned by DefaultPools. DefaultPools_ []*storage.Config // VolumeSourceFunc will be called by VolumeSource, if non-nil; // otherwise VolumeSource will return a NotSupported error. VolumeSourceFunc func(*storage.Config) (storage.VolumeSource, error) // FilesystemSourceFunc will be called by FilesystemSource, if non-nil; // otherwise FilesystemSource will return a NotSupported error. FilesystemSourceFunc func(*storage.Config) (storage.FilesystemSource, error) // ValidateConfigFunc will be called by ValidateConfig, if non-nil; // otherwise ValidateConfig returns nil. ValidateConfigFunc func(*storage.Config) error // SupportsFunc will be called by Supports, if non-nil; otherwise, // Supports returns true. SupportsFunc func(kind storage.StorageKind) bool }
StorageProvider is an implementation of storage.Provider, suitable for testing. Each method's default behaviour may be overridden by setting the corresponding Func field.
func (*StorageProvider) DefaultPools ¶
func (p *StorageProvider) DefaultPools() []*storage.Config
DefaultPool is defined on storage.Provider.
func (*StorageProvider) Dynamic ¶
func (p *StorageProvider) Dynamic() bool
Dynamic is defined on storage.Provider.
func (*StorageProvider) FilesystemSource ¶
func (p *StorageProvider) FilesystemSource(providerConfig *storage.Config) (storage.FilesystemSource, error)
FilesystemSource is defined on storage.Provider.
func (*StorageProvider) Scope ¶
func (p *StorageProvider) Scope() storage.Scope
Scope is defined on storage.Provider.
func (*StorageProvider) Supports ¶
func (p *StorageProvider) Supports(kind storage.StorageKind) bool
Supports is defined on storage.Provider.
func (*StorageProvider) ValidateConfig ¶
func (p *StorageProvider) ValidateConfig(providerConfig *storage.Config) error
ValidateConfig is defined on storage.Provider.
func (*StorageProvider) VolumeSource ¶
func (p *StorageProvider) VolumeSource(providerConfig *storage.Config) (storage.VolumeSource, error)
VolumeSource is defined on storage.Provider.
type VolumeSource ¶
type VolumeSource struct { testing.Stub CreateVolumesFunc func([]storage.VolumeParams) ([]storage.CreateVolumesResult, error) ListVolumesFunc func() ([]string, error) DescribeVolumesFunc func([]string) ([]storage.DescribeVolumesResult, error) DestroyVolumesFunc func([]string) ([]error, error) ValidateVolumeParamsFunc func(storage.VolumeParams) error AttachVolumesFunc func([]storage.VolumeAttachmentParams) ([]storage.AttachVolumesResult, error) DetachVolumesFunc func([]storage.VolumeAttachmentParams) ([]error, error) }
VolumeSource is an implementation of storage.VolumeSource, suitable for testing. Each method's default behaviour may be overridden by setting the corresponding Func field.
func (*VolumeSource) AttachVolumes ¶
func (s *VolumeSource) AttachVolumes(params []storage.VolumeAttachmentParams) ([]storage.AttachVolumesResult, error)
AttachVolumes is defined on storage.VolumeSource.
func (*VolumeSource) CreateVolumes ¶
func (s *VolumeSource) CreateVolumes(params []storage.VolumeParams) ([]storage.CreateVolumesResult, error)
CreateVolumes is defined on storage.VolumeSource.
func (*VolumeSource) DescribeVolumes ¶
func (s *VolumeSource) DescribeVolumes(volIds []string) ([]storage.DescribeVolumesResult, error)
DescribeVolumes is defined on storage.VolumeSource.
func (*VolumeSource) DestroyVolumes ¶
func (s *VolumeSource) DestroyVolumes(volIds []string) ([]error, error)
DestroyVolumes is defined on storage.VolumeSource.
func (*VolumeSource) DetachVolumes ¶
func (s *VolumeSource) DetachVolumes(params []storage.VolumeAttachmentParams) ([]error, error)
DetachVolumes is defined on storage.VolumeSource.
func (*VolumeSource) ListVolumes ¶
func (s *VolumeSource) ListVolumes() ([]string, error)
ListVolumes is defined on storage.VolumeSource.
func (*VolumeSource) ValidateVolumeParams ¶
func (s *VolumeSource) ValidateVolumeParams(params storage.VolumeParams) error
ValidateVolumeParams is defined on storage.VolumeSource.