Documentation ¶
Index ¶
Constants ¶
View Source
const ( StorageTypeLocal StorageType = "local" 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 ¶
This section is empty.
Types ¶
type ArchivePruner ¶
type ArchivePruner struct {
// contains filtered or unexported fields
}
func MakeArchivePruner ¶
func MakeArchivePruner(logger *zap.Logger, stowClient *StowClient, pruneInterval time.Duration) (*ArchivePruner, error)
func (*ArchivePruner) Start ¶
func (pruner *ArchivePruner) Start()
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 StorageService ¶
type StorageService struct {
// contains filtered or unexported fields
}
func MakeStorageService ¶
func MakeStorageService(logger *zap.Logger, storageClient *StowClient, port int) *StorageService
func RunStorageService ¶
func RunStorageService(logger *zap.Logger, storageType StorageType, storagePath string, containerName string, port int, enablePruner bool) *StorageService
func (*StorageService) Start ¶
func (ss *StorageService) Start(port int)
type StorageType ¶
type StorageType string
type StowClient ¶
type StowClient struct {
// contains filtered or unexported fields
}
func MakeStowClient ¶
func MakeStowClient(logger *zap.Logger, storageType StorageType, storagePath string, containerName string) (*StowClient, error)
type UploadResponse ¶
type UploadResponse struct {
ID string `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.