File tree Expand file tree Collapse file tree 2 files changed +0
-23
lines changed
Expand file tree Collapse file tree 2 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,6 @@ import (
3232 "github.com/google/go-containerregistry/pkg/v1/types"
3333)
3434
35- func fetcherFromWriter (w * writer ) * fetcher {
36- return & fetcher {
37- target : w .repo ,
38- client : w .client ,
39- }
40- }
41-
4235// fetcher implements methods for reading from a registry.
4336type fetcher struct {
4437 target resource
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import (
1818 "context"
1919 "sync"
2020
21- "github.com/google/go-containerregistry/pkg/logs"
2221 "github.com/google/go-containerregistry/pkg/name"
2322 v1 "github.com/google/go-containerregistry/pkg/v1"
2423 "github.com/google/go-containerregistry/pkg/v1/partial"
@@ -72,21 +71,6 @@ func (r *reader) init(ctx context.Context) error {
7271}
7372
7473func (p * Puller ) fetcher (ctx context.Context , target resource ) (* fetcher , error ) {
75- // If we are Reuse()ing a Pusher, we want to use that for token handshakes and scopes,
76- // but we want to do read requests via a fetcher{}.
77- //
78- // TODO(jonjohnsonjr): Unify fetcher, writer, and repoWriter.
79- if p .o .pusher != nil {
80- if repo , ok := target .(name.Repository ); ok {
81- w , err := p .o .pusher .writer (ctx , repo , p .o )
82- if err == nil {
83- return fetcherFromWriter (w .w ), nil
84- }
85- logs .Debug .Printf ("reusing Pusher failed: %v" , err )
86- }
87- }
88-
89- // Normal path for NewPuller.
9074 v , _ := p .readers .LoadOrStore (target , & reader {
9175 target : target ,
9276 o : p .o ,
You can’t perform that action at this time.
0 commit comments