Documentation ¶
Index ¶
- type NoopStorage
- func (s *NoopStorage) CleanupStorage(ctx context.Context, storageSpec model.StorageSpec, ...) error
- func (s *NoopStorage) Explode(ctx context.Context, spec model.StorageSpec) ([]model.StorageSpec, error)
- func (s *NoopStorage) GetVolumeSize(ctx context.Context, volume model.StorageSpec) (uint64, error)
- func (s *NoopStorage) HasStorageLocally(ctx context.Context, volume model.StorageSpec) (bool, error)
- func (s *NoopStorage) IsInstalled(ctx context.Context) (bool, error)
- func (s *NoopStorage) PrepareStorage(ctx context.Context, storageSpec model.StorageSpec) (storage.StorageVolume, error)
- func (s *NoopStorage) Upload(ctx context.Context, localPath string) (model.StorageSpec, error)
- type StorageConfig
- type StorageConfigExternalHooks
- type StroageHandlerCleanupStorage
- type StroageHandlerExplode
- type StroageHandlerGetVolumeSize
- type StroageHandlerHasStorageLocally
- type StroageHandlerIsInstalled
- type StroageHandlerPrepareStorage
- type StroageHandlerUpload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NoopStorage ¶
type NoopStorage struct {
Config StorageConfig
}
func NewNoopStorage ¶
func NewNoopStorage(config StorageConfig) *NoopStorage
func NewNoopStorageWithConfig ¶
func NewNoopStorageWithConfig(config StorageConfig) *NoopStorage
func (*NoopStorage) CleanupStorage ¶
func (s *NoopStorage) CleanupStorage(ctx context.Context, storageSpec model.StorageSpec, volume storage.StorageVolume) error
func (*NoopStorage) Explode ¶
func (s *NoopStorage) Explode(ctx context.Context, spec model.StorageSpec) ([]model.StorageSpec, error)
func (*NoopStorage) GetVolumeSize ¶
func (s *NoopStorage) GetVolumeSize(ctx context.Context, volume model.StorageSpec) (uint64, error)
we wrap this in a timeout because if the CID is not present on the network this seems to hang
func (*NoopStorage) HasStorageLocally ¶
func (s *NoopStorage) HasStorageLocally(ctx context.Context, volume model.StorageSpec) (bool, error)
func (*NoopStorage) IsInstalled ¶
func (s *NoopStorage) IsInstalled(ctx context.Context) (bool, error)
func (*NoopStorage) PrepareStorage ¶
func (s *NoopStorage) PrepareStorage(ctx context.Context, storageSpec model.StorageSpec) (storage.StorageVolume, error)
func (*NoopStorage) Upload ¶
func (s *NoopStorage) Upload(ctx context.Context, localPath string) (model.StorageSpec, error)
type StorageConfig ¶
type StorageConfig struct {
ExternalHooks StorageConfigExternalHooks
}
type StorageConfigExternalHooks ¶
type StorageConfigExternalHooks struct { IsInstalled StroageHandlerIsInstalled HasStorageLocally StroageHandlerHasStorageLocally GetVolumeSize StroageHandlerGetVolumeSize PrepareStorage StroageHandlerPrepareStorage CleanupStorage StroageHandlerCleanupStorage Upload StroageHandlerUpload Explode StroageHandlerExplode }
type StroageHandlerCleanupStorage ¶
type StroageHandlerCleanupStorage func(ctx context.Context, storageSpec model.StorageSpec, volume storage.StorageVolume) error
type StroageHandlerExplode ¶
type StroageHandlerExplode func(ctx context.Context, storageSpec model.StorageSpec) ([]model.StorageSpec, error)
type StroageHandlerPrepareStorage ¶
type StroageHandlerPrepareStorage func(ctx context.Context, storageSpec model.StorageSpec) (storage.StorageVolume, error)
type StroageHandlerUpload ¶
Click to show internal directories.
Click to hide internal directories.