hydrator

package
v0.0.0-...-128520e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetIfNotEmpty

func SetIfNotEmpty(dest map[string]string, orig http.Header, key string)

Types

type Cache

type Cache interface {
	Get(url string, cacheEntry *CacheEntry) (sizereaderat.SizeReaderAt, error)
	GetMetadata(url string, clientHeaders http.Header) (*CacheEntry, error)
	ForceGet(url string) (resp *http.Response, err error)
}

type CacheEntry

type CacheEntry struct {
	ObjectResults *cacheobject.ObjectResults
	Metadata      map[string]string
}

type Hydrator

type Hydrator interface {
	Get(url string, offset int64, length int64) ([]byte, error)
	GetMetadata(url string) (*CacheEntry, error)
	ForceGet(url string) (*http.Response, error)
}

func NewHydrator

func NewHydrator(urlRoot string) Hydrator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL