MCPcopy Create free account
hub / github.com/containerd/nerdctl / SupportsFullTransferService

Function SupportsFullTransferService

pkg/containerdutil/version.go:45–53  ·  view source on GitHub ↗

SupportsFullTransferService checks if the containerd version fully supports the Transfer service. While containerd 1.7 has Transfer service, full support is only available in 2.0+. The following features are missing in containerd 1.7: - Non-distributable artifacts support - Registry configuration op

(ctx context.Context, client *containerd.Client)

Source from the content-addressed store, hash-verified

43// - Non-distributable artifacts support
44// - Registry configuration options: WithHostDir(), WithDefaultScheme() etc.
45func SupportsFullTransferService(ctx context.Context, client *containerd.Client) bool {
46 sv, err := ServerSemVer(ctx, client)
47 if err != nil {
48 // If we can't determine version, assume it's an older version for safety
49 return false
50 }
51 v20, _ := semver.NewVersion("2.0.0")
52 return !sv.LessThan(v20)
53}

Callers 2

EnsureImageFunction · 0.92
PushFunction · 0.92

Calls 1

ServerSemVerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…