s3

package
v1.1.6-dev2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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, storageSpec models.InputSource) (storage.StorageVolume, error)

func (*StorageProvider) Upload

type StorageProviderParams

type StorageProviderParams struct {
	LocalDir       string
	ClientProvider *s3helper.ClientProvider
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL