Documentation ¶
Index ¶
- type NoopStorage
- func (s *NoopStorage) CleanupStorage(ctx context.Context, storageSpec models.InputSource, ...) error
- func (s *NoopStorage) GetVolumeSize(ctx context.Context, volume models.InputSource) (uint64, error)
- func (s *NoopStorage) HasStorageLocally(ctx context.Context, volume models.InputSource) (bool, error)
- func (s *NoopStorage) IsInstalled(ctx context.Context) (bool, error)
- func (s *NoopStorage) PrepareStorage(ctx context.Context, storageDir string, storageSpec models.InputSource) (storage.StorageVolume, error)
- func (s *NoopStorage) Upload(ctx context.Context, localPath string) (models.SpecConfig, error)
- type StorageConfig
- type StorageConfigExternalHooks
- type StorageHandlerCleanupStorage
- type StorageHandlerGetVolumeSize
- type StorageHandlerHasStorageLocally
- type StorageHandlerIsInstalled
- type StorageHandlerPrepareStorage
- type StorageHandlerUpload
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() *NoopStorage
func NewNoopStorageWithConfig ¶
func NewNoopStorageWithConfig(config StorageConfig) *NoopStorage
func (*NoopStorage) CleanupStorage ¶
func (s *NoopStorage) CleanupStorage(ctx context.Context, storageSpec models.InputSource, volume storage.StorageVolume) error
func (*NoopStorage) GetVolumeSize ¶
func (s *NoopStorage) GetVolumeSize(ctx context.Context, volume models.InputSource) (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 models.InputSource) (bool, error)
func (*NoopStorage) IsInstalled ¶
func (s *NoopStorage) IsInstalled(ctx context.Context) (bool, error)
func (*NoopStorage) PrepareStorage ¶
func (s *NoopStorage) PrepareStorage( ctx context.Context, storageDir string, storageSpec models.InputSource) (storage.StorageVolume, error)
func (*NoopStorage) Upload ¶
func (s *NoopStorage) Upload(ctx context.Context, localPath string) (models.SpecConfig, error)
type StorageConfig ¶
type StorageConfig struct {
ExternalHooks StorageConfigExternalHooks
}
type StorageConfigExternalHooks ¶
type StorageConfigExternalHooks struct { IsInstalled StorageHandlerIsInstalled HasStorageLocally StorageHandlerHasStorageLocally GetVolumeSize StorageHandlerGetVolumeSize PrepareStorage StorageHandlerPrepareStorage CleanupStorage StorageHandlerCleanupStorage Upload StorageHandlerUpload }
type StorageHandlerCleanupStorage ¶ added in v1.0.1
type StorageHandlerCleanupStorage func( ctx context.Context, storageSpec models.InputSource, volume storage.StorageVolume) error
type StorageHandlerGetVolumeSize ¶ added in v1.0.1
type StorageHandlerHasStorageLocally ¶ added in v1.0.1
type StorageHandlerIsInstalled ¶ added in v1.0.1
type StorageHandlerPrepareStorage ¶ added in v1.0.1
type StorageHandlerPrepareStorage func( ctx context.Context, storageDir string, storageSpec models.InputSource) (storage.StorageVolume, error)
type StorageHandlerUpload ¶ added in v1.0.1
Click to show internal directories.
Click to hide internal directories.