Discover Packages
github.com/nathan-osman/go-aptproxy
cache
package
Version:
v0.0.0-...-02fe4d0
Opens a new window with list of versions in this module.
Published: May 7, 2016
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
Cache provides access to entries in the cache.
NewCache creates a new cache in the specified directory.
Close waits for all downloaders to complete before shutting down.
GetReader obtains a Reader for the specified rawurl. If a downloader
currently exists for the URL, a live reader is created and connected to it.
If the URL exists in the cache, it is read using the standard file API. If
not, a downloader and live reader are created.
Insert adds an item into the cache.
type DownloadError struct {
Status string
}
DownloadError conveys information about a download request that failed.
Error returns a description of the error.
type Entry struct {
URL string `json:"url"`
Complete bool `json:"complete"`
ContentLength string `json:"content_length"`
ContentType string `json:"content_type"`
LastModified string `json:"last_modified"`
}
Entry represents an individual item in the cache.
Load reads the entry from disk.
Save writes the entry to disk.
Reader is a generic interface for reading cache entries either from disk or
directly attached to a downloader.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.