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

Function ServerSemVer

pkg/containerdutil/version.go:28–38  ·  view source on GitHub ↗
(ctx context.Context, client *containerd.Client)

Source from the content-addressed store, hash-verified

26)
27
28func 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+.

Callers 3

NewTaskFunction · 0.92
ContainerdVersionFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…