Files
zot/pkg/extensions/sync/on_demand_disabled.go
T
copilot-swe-agent[bot] e8543c720b Implement blob streaming sync with on-demand support
- Add SyncBlob method to sync service and on-demand interface
- Integrate blob sync into GetBlob API handler
- Use regclient to fetch blobs from upstream
- Automatically trigger sync when blob not found locally
- Handle sync errors gracefully with retry to local storage

This implements the core requirement from PR #3733 discussion:
check if blob exists, if not, sync from upstream on-demand.

Co-authored-by: rchincha <45800463+rchincha@users.noreply.github.com>
2026-01-26 01:27:59 +00:00

26 lines
513 B
Go

//go:build !sync
package sync
import (
"context"
godigest "github.com/opencontainers/go-digest"
)
type BaseOnDemand struct{}
func (onDemand *BaseOnDemand) SyncImage(ctx context.Context, repo, reference string) error {
return nil
}
func (onDemand *BaseOnDemand) SyncReferrers(ctx context.Context, repo string,
subjectDigestStr string, referenceTypes []string,
) error {
return nil
}
func (onDemand *BaseOnDemand) SyncBlob(ctx context.Context, repo string, digest godigest.Digest) error {
return nil
}