Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
Simplify CachingFetcher proto configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Qinusty committed Aug 13, 2020
1 parent 01b36da commit f67fecc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 3 additions & 1 deletion pkg/configuration/new_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ func NewFetcherFromConfiguration(configuration *pb.FetcherConfiguration,
var fetcher remoteasset.FetchServer
switch backend := configuration.Backend.(type) {
case *pb.FetcherConfiguration_Caching:
innerFetcher, err := NewFetcherFromConfiguration(backend.Caching.Fetcher, assetStore, casBlobAccessCreator)
innerFetcher, err := NewFetcherFromConfiguration(
backend.Caching, assetStore,
casBlobAccessCreator)
if err != nil {
return nil, err
}
Expand Down
7 changes: 1 addition & 6 deletions pkg/proto/configuration/bb_asset_hub/fetch/fetcher.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ option go_package = "github.com/buildbarn/bb-asset-hub/pkg/proto/configuration/b
message FetcherConfiguration {
oneof backend {
// Reads and writes to the AssetStore to return cached responses
CachingFetcherConfiguration caching = 1;
FetcherConfiguration caching = 1;

// Downloads blobs over HTTP and place them into a CAS for retrieval over
// REv2 ReadBlobs requests.
Expand All @@ -24,11 +24,6 @@ message FetcherConfiguration {
google.rpc.Status error = 3;
}

message CachingFetcherConfiguration {
// Fetcher to wrap and cache results from
FetcherConfiguration fetcher = 1;
}

message HttpFetcherConfiguration {
// Configuration for blob storage.
buildbarn.configuration.blobstore.BlobAccessConfiguration
Expand Down

0 comments on commit f67fecc

Please sign in to comment.