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)
| 43 | // - Non-distributable artifacts support |
| 44 | // - Registry configuration options: WithHostDir(), WithDefaultScheme() etc. |
| 45 | func 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 | } |
no test coverage detected
searching dependent graphs…