Documentation ¶
Index ¶
- type AuthHeaders
- type Fetcher
- func NewCachingFetcher(fetcher Fetcher, assetStore storage.AssetStore) Fetcher
- func NewErrorFetcher(err *protostatus.Status) Fetcher
- func NewHTTPFetcher(httpClient *http.Client, contentAddressableStorage blobstore.BlobAccess, ...) Fetcher
- func NewLoggingFetcher(fetcher Fetcher) Fetcher
- func NewMetricsFetcher(fetcher Fetcher, clock clock.Clock, name string) Fetcher
- func NewRemoteExecutionFetcher(contentAddressableStorage blobstore.BlobAccess, ...) Fetcher
- func NewValidatingFetcher(fetcher Fetcher) Fetcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHeaders ¶
AuthHeaders is a map from target URI to headers to be applied for the request
func NewAuthHeadersFromQualifier ¶
func NewAuthHeadersFromQualifier(value string) (*AuthHeaders, error)
NewAuthHeadersFromQualifier creates an AuthHeaders from the qualifier payload
func (AuthHeaders) ApplyHeaders ¶
func (ah AuthHeaders) ApplyHeaders(uri string, req *http.Request)
ApplyHeaders mutates a http.Request to apply headers requested by the client.
type Fetcher ¶
type Fetcher interface { // The same as a Remote Asset API FetchBlob request FetchBlob(context.Context, *remoteasset.FetchBlobRequest) (*remoteasset.FetchBlobResponse, error) // The same as a Remote Asset API FetchDirectory request FetchDirectory(context.Context, *remoteasset.FetchDirectoryRequest) (*remoteasset.FetchDirectoryResponse, error) // Check for unsupported Qualifiers, returning a set of the _unsupported_ qualifiers CheckQualifiers(qualifier.Set) qualifier.Set }
Fetcher is an abstraction around a Remote Asset API Fetch Server to allow for more consistent Qualifier usage.
func NewCachingFetcher ¶
func NewCachingFetcher(fetcher Fetcher, assetStore storage.AssetStore) Fetcher
NewCachingFetcher creates a decorator for remoteasset.FetchServer implementations to avoid having to fetch the blob remotely multiple times
func NewErrorFetcher ¶
func NewErrorFetcher(err *protostatus.Status) Fetcher
NewErrorFetcher creates a Remote Asset API Fetch service which simply returns a set gRPC status
func NewHTTPFetcher ¶
func NewHTTPFetcher(httpClient *http.Client, contentAddressableStorage blobstore.BlobAccess, allowUpdatesForInstances map[bb_digest.InstanceName]bool, ) Fetcher
NewHTTPFetcher creates a remoteasset FetchServer compatible service for handling requests which involve downloading assets over HTTP and storing them into a CAS.
func NewLoggingFetcher ¶
NewLoggingFetcher creates a fetcher which logs requests and results
func NewMetricsFetcher ¶
NewMetricsFetcher creates a fetcher which logs metrics to prometheus
func NewRemoteExecutionFetcher ¶
func NewRemoteExecutionFetcher(contentAddressableStorage blobstore.BlobAccess, client grpc.ClientConnInterface, maximumMessageSizeBytes int) Fetcher
NewRemoteExecutionFetcher creates a new Fetcher that is capable of itself fetching resources from other places (as defined in the qualifier_translator).
func NewValidatingFetcher ¶
NewValidatingFetcher creates a fetcher that validates Fetch* requests are valid, before passing on to a backend