Documentation
¶
Index ¶
- func GenerateKey(url string, headers map[string]string) ([]byte, error)
- func NewCache(config Config) hydrator.Cache
- func NewLazyReader(reader io.ReaderAt, start, end, blockSize int64) io.ReadSeeker
- func NewMetadataSyncer(cache MetadataCache, c *clientv3.Client) error
- type Config
- type Key
- type MetadataCache
- type MetadataRequest
- type MetadataSyncer
- type NotCacheable
- type WriterReadSeeker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLazyReader ¶
func NewLazyReader(reader io.ReaderAt, start, end, blockSize int64) io.ReadSeeker
func NewMetadataSyncer ¶
func NewMetadataSyncer(cache MetadataCache, c *clientv3.Client) error
Types ¶
type Key ¶
type Key struct { // required Url string // required if present ContentLength uint64 `json:",omitempty"` ContentEncoding string `json:",omitempty"` // require only first. // last retrieved used as fallback // if last retrieved is set, always set to time.Now() to force expiration Etag string `json:",omitempty"` Sha512 string `json:",omitempty"` Sha256 string `json:",omitempty"` Sha1 string `json:",omitempty"` Md5 string `json:",omitempty"` LastModified string `json:",omitempty"` LastRetrieved string `json:",omitempty"` }
type MetadataCache ¶
type MetadataCache interface { Add(key string, cacheEntry hydrator.CacheEntry) error AddWithoutSync(key string, metadata hydrator.CacheEntry) Get(key string, clientHeaders http.Header) (*hydrator.CacheEntry, bool) Remove(key string) RemoveWithoutSync(key string) AddSync(syncer MetadataSyncer) }
func NewMetadataCache ¶
func NewMetadataCache() MetadataCache
type MetadataRequest ¶
type MetadataSyncer ¶
type NotCacheable ¶
type NotCacheable struct{}
func (NotCacheable) Error ¶
func (_ NotCacheable) Error() string
type WriterReadSeeker ¶
type WriterReadSeeker interface { io.ReadSeeker io.WriterTo }
Click to show internal directories.
Click to hide internal directories.