Documentation ¶
Index ¶
- func StorageProviders() storage.ProviderRegistry
- type FilesystemSource
- func (s *FilesystemSource) AttachFilesystems(ctx envcontext.ProviderCallContext, ...) ([]storage.AttachFilesystemsResult, error)
- func (s *FilesystemSource) CreateFilesystems(ctx envcontext.ProviderCallContext, params []storage.FilesystemParams) ([]storage.CreateFilesystemsResult, error)
- func (s *FilesystemSource) DestroyFilesystems(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error)
- func (s *FilesystemSource) DetachFilesystems(ctx envcontext.ProviderCallContext, ...) ([]error, error)
- func (s *FilesystemSource) ReleaseFilesystems(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error)
- func (s *FilesystemSource) ValidateFilesystemParams(params storage.FilesystemParams) error
- 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) Releasable() bool
- 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) ValidateForK8s(attributes map[string]any) error
- func (p *StorageProvider) VolumeSource(providerConfig *storage.Config) (storage.VolumeSource, error)
- type VolumeSource
- func (s *VolumeSource) AttachVolumes(ctx envcontext.ProviderCallContext, params []storage.VolumeAttachmentParams) ([]storage.AttachVolumesResult, error)
- func (s *VolumeSource) CreateVolumes(ctx envcontext.ProviderCallContext, params []storage.VolumeParams) ([]storage.CreateVolumesResult, error)
- func (s *VolumeSource) DescribeVolumes(ctx envcontext.ProviderCallContext, volIds []string) ([]storage.DescribeVolumesResult, error)
- func (s *VolumeSource) DestroyVolumes(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error)
- func (s *VolumeSource) DetachVolumes(ctx envcontext.ProviderCallContext, params []storage.VolumeAttachmentParams) ([]error, error)
- func (s *VolumeSource) ListVolumes(ctx envcontext.ProviderCallContext) ([]string, error)
- func (s *VolumeSource) ReleaseVolumes(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error)
- func (s *VolumeSource) ValidateVolumeParams(params storage.VolumeParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StorageProviders ¶
func StorageProviders() storage.ProviderRegistry
StorageProviders returns a provider registry with some well-defined dummy storage providers.
Types ¶
type FilesystemSource ¶
type FilesystemSource struct { testing.Stub CreateFilesystemsFunc func(envcontext.ProviderCallContext, []storage.FilesystemParams) ([]storage.CreateFilesystemsResult, error) DestroyFilesystemsFunc func(envcontext.ProviderCallContext, []string) ([]error, error) ReleaseFilesystemsFunc func(envcontext.ProviderCallContext, []string) ([]error, error) ValidateFilesystemParamsFunc func(storage.FilesystemParams) error AttachFilesystemsFunc func(envcontext.ProviderCallContext, []storage.FilesystemAttachmentParams) ([]storage.AttachFilesystemsResult, error) DetachFilesystemsFunc func(envcontext.ProviderCallContext, []storage.FilesystemAttachmentParams) ([]error, error) }
FilesystemSource is an implementation of storage.FilesystemSource, suitable for testing. Each method's default behaviour may be overridden by setting the corresponding Func field.
func (*FilesystemSource) AttachFilesystems ¶
func (s *FilesystemSource) AttachFilesystems(ctx envcontext.ProviderCallContext, params []storage.FilesystemAttachmentParams) ([]storage.AttachFilesystemsResult, error)
AttachFilesystems is defined on storage.FilesystemSource.
func (*FilesystemSource) CreateFilesystems ¶
func (s *FilesystemSource) CreateFilesystems(ctx envcontext.ProviderCallContext, params []storage.FilesystemParams) ([]storage.CreateFilesystemsResult, error)
CreateFilesystems is defined on storage.FilesystemSource.
func (*FilesystemSource) DestroyFilesystems ¶
func (s *FilesystemSource) DestroyFilesystems(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error)
DestroyFilesystems is defined on storage.FilesystemSource.
func (*FilesystemSource) DetachFilesystems ¶
func (s *FilesystemSource) DetachFilesystems(ctx envcontext.ProviderCallContext, params []storage.FilesystemAttachmentParams) ([]error, error)
DetachFilesystems is defined on storage.FilesystemSource.
func (*FilesystemSource) ReleaseFilesystems ¶
func (s *FilesystemSource) ReleaseFilesystems(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error)
ReleaseFilesystems is defined on storage.FilesystemSource.
func (*FilesystemSource) ValidateFilesystemParams ¶
func (s *FilesystemSource) ValidateFilesystemParams(params storage.FilesystemParams) error
ValidateFilesystemParams is defined on storage.FilesystemSource.
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 // IsReleasable defines whether or not the provider reports that it // supports releasing storage. IsReleasable 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 // ValidateForK8sFunc will be called by ValidateForK8s, if non-nil; // otherwise ValidateForK8s returns nil. ValidateForK8sFunc func(map[string]any) 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) Releasable ¶
func (p *StorageProvider) Releasable() bool
Releasable 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) ValidateForK8s ¶
func (p *StorageProvider) ValidateForK8s(attributes map[string]any) error
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(envcontext.ProviderCallContext, []storage.VolumeParams) ([]storage.CreateVolumesResult, error) ListVolumesFunc func(envcontext.ProviderCallContext) ([]string, error) DescribeVolumesFunc func(envcontext.ProviderCallContext, []string) ([]storage.DescribeVolumesResult, error) DestroyVolumesFunc func(envcontext.ProviderCallContext, []string) ([]error, error) ReleaseVolumesFunc func(envcontext.ProviderCallContext, []string) ([]error, error) ValidateVolumeParamsFunc func(storage.VolumeParams) error AttachVolumesFunc func(envcontext.ProviderCallContext, []storage.VolumeAttachmentParams) ([]storage.AttachVolumesResult, error) DetachVolumesFunc func(envcontext.ProviderCallContext, []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(ctx envcontext.ProviderCallContext, params []storage.VolumeAttachmentParams) ([]storage.AttachVolumesResult, error)
AttachVolumes is defined on storage.VolumeSource.
func (*VolumeSource) CreateVolumes ¶
func (s *VolumeSource) CreateVolumes(ctx envcontext.ProviderCallContext, params []storage.VolumeParams) ([]storage.CreateVolumesResult, error)
CreateVolumes is defined on storage.VolumeSource.
func (*VolumeSource) DescribeVolumes ¶
func (s *VolumeSource) DescribeVolumes(ctx envcontext.ProviderCallContext, volIds []string) ([]storage.DescribeVolumesResult, error)
DescribeVolumes is defined on storage.VolumeSource.
func (*VolumeSource) DestroyVolumes ¶
func (s *VolumeSource) DestroyVolumes(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error)
DestroyVolumes is defined on storage.VolumeSource.
func (*VolumeSource) DetachVolumes ¶
func (s *VolumeSource) DetachVolumes(ctx envcontext.ProviderCallContext, params []storage.VolumeAttachmentParams) ([]error, error)
DetachVolumes is defined on storage.VolumeSource.
func (*VolumeSource) ListVolumes ¶
func (s *VolumeSource) ListVolumes(ctx envcontext.ProviderCallContext) ([]string, error)
ListVolumes is defined on storage.VolumeSource.
func (*VolumeSource) ReleaseVolumes ¶
func (s *VolumeSource) ReleaseVolumes(ctx envcontext.ProviderCallContext, volIds []string) ([]error, error)
ReleaseVolumes is defined on storage.VolumeSource.
func (*VolumeSource) ValidateVolumeParams ¶
func (s *VolumeSource) ValidateVolumeParams(params storage.VolumeParams) error
ValidateVolumeParams is defined on storage.VolumeSource.