Skip to content

Commit e6200bf

Browse files
robnester-rhclaude
andcommitted
docs(EC-1778): add doc comments to downloader declarations
reference: EC-1778 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 427d3d6 commit e6200bf

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

internal/downloader/downloader.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,24 @@ type key int
3838

3939
const downloadImplKey key = 0
4040

41+
// downloadImpl defines the interface for downloading files.
4142
type downloadImpl interface {
4243
Download(context.Context, string, []string) error
4344
}
4445

4546
var log = logrus.StandardLogger()
4647

48+
// ociGatherer and httpGatherer hold gatherer instances configured with
49+
// tracing and retry transports via WithTransport. Initialized once by
50+
// _initialize via sync.OnceFunc.
4751
var (
4852
ociGatherer *goci.OCIGatherer
4953
httpGatherer *ghttp.HTTPGatherer
5054
)
5155

56+
// gatherFunc dispatches sources to the appropriate gatherer. OCI and HTTP
57+
// scheme prefixes route to custom gatherers; all other sources fall through
58+
// to the go-gather registry.
5259
var gatherFunc = func(ctx context.Context, source, destination string) (metadata.Metadata, error) {
5360
initialize()
5461

@@ -71,6 +78,8 @@ var gatherFunc = func(ctx context.Context, source, destination string) (metadata
7178
return g.Gather(ctx, source, destination)
7279
}
7380

81+
// _initialize builds the transport stack (optional tracing + retry) and
82+
// constructs the OCI and HTTP gatherer instances.
7483
var _initialize = func() {
7584
var base net_http.RoundTripper = net_http.DefaultTransport
7685

0 commit comments

Comments
 (0)