()
| 81 | ) |
| 82 | |
| 83 | func init() { |
| 84 | const prefix = "types.containerd.io" |
| 85 | // register TypeUrls for commonly marshaled external types |
| 86 | major := strconv.Itoa(specs.VersionMajor) |
| 87 | typeurl.Register(&specs.Spec{}, prefix, "opencontainers/runtime-spec", major, "Spec") |
| 88 | typeurl.Register(&specs.Process{}, prefix, "opencontainers/runtime-spec", major, "Process") |
| 89 | typeurl.Register(&specs.LinuxResources{}, prefix, "opencontainers/runtime-spec", major, "LinuxResources") |
| 90 | typeurl.Register(&specs.WindowsResources{}, prefix, "opencontainers/runtime-spec", major, "WindowsResources") |
| 91 | typeurl.Register(&features.Features{}, prefix, "opencontainers/runtime-spec", major, "features", "Features") |
| 92 | |
| 93 | if runtime.GOOS == "windows" { |
| 94 | // After bumping GRPC to 1.64, Windows tests started failing with: "name resolver error: produced zero addresses". |
| 95 | // This is happening because grpc.NewClient uses DNS resolver by default, which apparently not what we want |
| 96 | // when using socket paths on Windows. |
| 97 | // Using a workaround from https://github.com/grpc/grpc-go/issues/1786#issuecomment-2119088770 |
| 98 | resolver.SetDefaultScheme("passthrough") |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // New returns a new containerd client that is connected to the containerd |
| 103 | // instance provided by address |
nothing calls this directly
no test coverage detected
searching dependent graphs…