(ctx context.Context, client *containerd.Client)
| 26 | ) |
| 27 | |
| 28 | func ServerSemVer(ctx context.Context, client *containerd.Client) (*semver.Version, error) { |
| 29 | v, err := client.Version(ctx) |
| 30 | if err != nil { |
| 31 | return nil, err |
| 32 | } |
| 33 | sv, err := semver.NewVersion(v.Version) |
| 34 | if err != nil { |
| 35 | return nil, fmt.Errorf("failed to parse the containerd version %q: %w", v.Version, err) |
| 36 | } |
| 37 | return sv, nil |
| 38 | } |
| 39 | |
| 40 | // SupportsFullTransferService checks if the containerd version fully supports the Transfer service. |
| 41 | // While containerd 1.7 has Transfer service, full support is only available in 2.0+. |
no outgoing calls
no test coverage detected
searching dependent graphs…