Categorygithub.com/nitro/filecache
modulepackage
0.0.0-20190723124820-9bd490e4827b
Repository: https://github.com/nitro/filecache.git
Documentation: pkg.go.dev

# README

Filecache

Implements a local, rudimentary file cache backed by an S3 bucket. This is useful for a file caching service.

# Functions

DefaultExtension sets the default extension which will be appended to cached files in the local directory.
DownloadTimeout sets the file download timeout.
DropboxDownload will download a file from the specified Dropbox location into localFile.
DropboxDownloader allows the DownloadFunc to pull files from Dropbox accounts.
New returns a properly configured cache.
NewDownloadRecord converts the incoming URL path into a download record containing a cached filename (this is the filename on the backing store, not the cached filename locally) together with the args needed for authentication.
NewS3RegionManagedDownloader returns a configured instance where the default bucket region will be as passed.
S3Downloader allows the DownloadFunc to pull files from S3 buckets.

# Constants

No description provided by the author
No description provided by the author

# Variables

HashableArgs allows us to support various authentication headers in the future.

# Structs

DownloadRecord contains information about a file which will be downloaded.
FileCache is a wrapper for hashicorp/golang-lru.
Manages a cache of s3manager.Downloader s that have been configured for their correct region.

# Type aliases

No description provided by the author
No description provided by the author