mirror of
https://github.com/containerd/containerd.git
synced 2026-11-06 05:17:02 +00:00
resolve lint issue upstreamcri.NewRemoteImageService() is deprecated
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
1 parent
ee09726316
commit
00ecad3d7a
2 files changed
+12
-2
No files matched your search
@@ -52,7 +52,12 @@ type ImageService struct {
|
||||
// NewImageService creates a legacy-style CRI image client backed by the
|
||||
// upstream Kubernetes CRI client.
|
||||
func NewImageService(endpoint string, connectionTimeout time.Duration) (*ImageService, error) {
|
||||
imageService, err := upstreamcri.NewRemoteImageService(context.Background(), endpoint, connectionTimeout, nil, false)
|
||||
imageService, err := upstreamcri.NewRemoteImageServiceBuilder().
|
||||
WithEndpoint(endpoint).
|
||||
WithConnectionTimeout(connectionTimeout).
|
||||
WithTracerProvider(nil).
|
||||
WithUseStreaming(false).
|
||||
Build(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -59,7 +59,12 @@ type RuntimeService struct {
|
||||
// NewRuntimeService creates a legacy-style CRI runtime client backed by the
|
||||
// upstream Kubernetes CRI client.
|
||||
func NewRuntimeService(endpoint string, connectionTimeout time.Duration) (*RuntimeService, error) {
|
||||
runtimeService, err := upstreamcri.NewRemoteRuntimeService(context.Background(), endpoint, connectionTimeout, nil, false)
|
||||
runtimeService, err := upstreamcri.NewRemoteRuntimeServiceBuilder().
|
||||
WithEndpoint(endpoint).
|
||||
WithConnectionTimeout(connectionTimeout).
|
||||
WithTracerProvider(nil).
|
||||
WithUseStreaming(false).
|
||||
Build(context.Background())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user