Documentation ¶
Index ¶
- type StorageProvider
- func (s *StorageProvider) CleanupStorage(_ context.Context, _ models.InputSource, volume storage.StorageVolume) error
- func (s *StorageProvider) GetVolumeSize(ctx context.Context, volume models.InputSource) (uint64, error)
- func (s *StorageProvider) HasStorageLocally(_ context.Context, _ models.InputSource) (bool, error)
- func (s *StorageProvider) IsInstalled(_ context.Context) (bool, error)
- func (s *StorageProvider) PrepareStorage(ctx context.Context, storageDirectory string, storageSpec models.InputSource) (storage.StorageVolume, error)
- func (s *StorageProvider) Upload(_ context.Context, _ string) (models.SpecConfig, error)
- type StorageProviderParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StorageProvider ¶
type StorageProvider struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage(params StorageProviderParams) *StorageProvider
func (*StorageProvider) CleanupStorage ¶
func (s *StorageProvider) CleanupStorage(_ context.Context, _ models.InputSource, volume storage.StorageVolume) error
func (*StorageProvider) GetVolumeSize ¶
func (s *StorageProvider) GetVolumeSize(ctx context.Context, volume models.InputSource) (uint64, error)
func (*StorageProvider) HasStorageLocally ¶
func (s *StorageProvider) HasStorageLocally(_ context.Context, _ models.InputSource) (bool, error)
HasStorageLocally checks if the requested content is hosted locally.
func (*StorageProvider) IsInstalled ¶
func (s *StorageProvider) IsInstalled(_ context.Context) (bool, error)
IsInstalled checks if the storage provider is installed We assume that the storage provider is installed if the host has AWS credentials configured, which includes: - Configuring the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables - Configuring credentials in ~/.aws/credentials - Configuring credentials in the EC2 instance metadata service, assuming the host is running on EC2
func (*StorageProvider) PrepareStorage ¶
func (s *StorageProvider) PrepareStorage( ctx context.Context, storageDirectory string, storageSpec models.InputSource) (storage.StorageVolume, error)
func (*StorageProvider) Upload ¶
func (s *StorageProvider) Upload(_ context.Context, _ string) (models.SpecConfig, error)
type StorageProviderParams ¶
type StorageProviderParams struct {
ClientProvider *s3helper.ClientProvider
}
Click to show internal directories.
Click to hide internal directories.