about summary refs log tree commit diff
path: root/tools/nixery/storage/gcs.go
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-10-27T12·47+0100
committerVincent Ambo <mail@tazj.in>2020-10-27T14·29+0100
commitcbbf45b5cb268a605134022d91308e6c57c9d273 (patch)
tree22df0e6fe18fdb851450bc5263fe9508d3e893f6 /tools/nixery/storage/gcs.go
parent5ce745d104e82d836967e3bd9fd7af9602e76114 (diff)
refactor(storage): Rename ServeLayer -> Serve
This is going to be used for general content-addressed objects, and is
not layer specific anymore.
Diffstat (limited to 'tools/nixery/storage/gcs.go')
-rw-r--r--tools/nixery/storage/gcs.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/nixery/storage/gcs.go b/tools/nixery/storage/gcs.go
index c247cca62140..61b5dea52351 100644
--- a/tools/nixery/storage/gcs.go
+++ b/tools/nixery/storage/gcs.go
@@ -150,18 +150,18 @@ func (b *GCSBackend) Move(ctx context.Context, old, new string) error {
 	return nil
 }
 
-func (b *GCSBackend) ServeLayer(digest string, r *http.Request, w http.ResponseWriter) error {
+func (b *GCSBackend) Serve(digest string, r *http.Request, w http.ResponseWriter) error {
 	url, err := b.constructLayerUrl(digest)
 	if err != nil {
 		log.WithError(err).WithFields(log.Fields{
-			"layer":  digest,
+			"digest": digest,
 			"bucket": b.bucket,
 		}).Error("failed to sign GCS URL")
 
 		return err
 	}
 
-	log.WithField("layer", digest).Info("redirecting layer request to GCS bucket")
+	log.WithField("digest", digest).Info("redirecting blob request to GCS bucket")
 
 	w.Header().Set("Location", url)
 	w.WriteHeader(303)