Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StorageTypeLocal is a constant to hold local storate type name literal StorageTypeLocal StorageType = "local" // StorageTypeS3 is a constant to hold S3 storage type name literal StorageTypeS3 StorageType = "s3" // PaginationSize is a constant to hold no of pages PaginationSize int = 10 )
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrRetrievingItem = errors.New("unable to retrieve item") ErrOpeningItem = errors.New("unable to open item") ErrWritingFile = errors.New("unable to write file") ErrWritingFileIntoResponse = errors.New("unable to copy item into http response") )
Functions ¶
Types ¶
type ArchivePruner ¶
type ArchivePruner struct {
// contains filtered or unexported fields
}
func MakeArchivePruner ¶
func MakeArchivePruner(logger *zap.Logger, clientGen crd.ClientGeneratorInterface, stowClient *StowClient, pruneInterval time.Duration) (*ArchivePruner, error)
func (*ArchivePruner) Start ¶
func (pruner *ArchivePruner) Start(ctx context.Context, mgr manager.Interface)
Start starts a go routine that listens to a channel for archive IDs that need to deleted. Also wakes up at regular intervals to make a list of archive IDs that need to be reaped and sends them over to the channel for deletion
type Storage ¶ added in v1.10.0
type Storage interface {
// contains filtered or unexported methods
}
Storage is an interface to force storage level details implementation.
func NewLocalStorage ¶ added in v1.10.0
NewLocalStorage return new local storage struct
func NewS3Storage ¶ added in v1.10.0
NewS3Storage returns a new s3 storage struct
type StorageService ¶
type StorageService struct {
// contains filtered or unexported fields
}
StorageService is a struct to hold all things for storage service
func MakeStorageService ¶
func MakeStorageService(logger *zap.Logger, storageClient *StowClient, port int) *StorageService
type StorageType ¶
type StorageType string
StorageType contains all different types of supported storage
type StowClient ¶
type StowClient struct {
// contains filtered or unexported fields
}
StowClient is the wrapper client for stow (Cloud storage abstraction package)
func MakeStowClient ¶
func MakeStowClient(logger *zap.Logger, storage Storage) (*StowClient, error)
MakeStowClient create a new StowClient for given storage
type UploadResponse ¶
type UploadResponse struct {
ID string `json:"id"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.