@@ -47,14 +47,14 @@ import (
4747 "github.com/containerd/cri/integration/remote/util"
4848)
4949
50- // RemoteImageService is a gRPC implementation of internalapi.ImageManagerService.
51- type RemoteImageService struct {
50+ // ImageService is a gRPC implementation of internalapi.ImageManagerService.
51+ type ImageService struct {
5252 timeout time.Duration
5353 imageClient runtimeapi.ImageServiceClient
5454}
5555
56- // NewRemoteImageService creates a new internalapi.ImageManagerService.
57- func NewRemoteImageService (endpoint string , connectionTimeout time.Duration ) (internalapi.ImageManagerService , error ) {
56+ // NewImageService creates a new internalapi.ImageManagerService.
57+ func NewImageService (endpoint string , connectionTimeout time.Duration ) (internalapi.ImageManagerService , error ) {
5858 klog .V (3 ).Infof ("Connecting to image service %s" , endpoint )
5959 addr , dialer , err := util .GetAddressAndDialer (endpoint )
6060 if err != nil {
@@ -70,14 +70,14 @@ func NewRemoteImageService(endpoint string, connectionTimeout time.Duration) (in
7070 return nil , err
7171 }
7272
73- return & RemoteImageService {
73+ return & ImageService {
7474 timeout : connectionTimeout ,
7575 imageClient : runtimeapi .NewImageServiceClient (conn ),
7676 }, nil
7777}
7878
7979// ListImages lists available images.
80- func (r * RemoteImageService ) ListImages (filter * runtimeapi.ImageFilter ) ([]* runtimeapi.Image , error ) {
80+ func (r * ImageService ) ListImages (filter * runtimeapi.ImageFilter ) ([]* runtimeapi.Image , error ) {
8181 ctx , cancel := getContextWithTimeout (r .timeout )
8282 defer cancel ()
8383
@@ -93,7 +93,7 @@ func (r *RemoteImageService) ListImages(filter *runtimeapi.ImageFilter) ([]*runt
9393}
9494
9595// ImageStatus returns the status of the image.
96- func (r * RemoteImageService ) ImageStatus (image * runtimeapi.ImageSpec ) (* runtimeapi.Image , error ) {
96+ func (r * ImageService ) ImageStatus (image * runtimeapi.ImageSpec ) (* runtimeapi.Image , error ) {
9797 ctx , cancel := getContextWithTimeout (r .timeout )
9898 defer cancel ()
9999
@@ -117,7 +117,7 @@ func (r *RemoteImageService) ImageStatus(image *runtimeapi.ImageSpec) (*runtimea
117117}
118118
119119// PullImage pulls an image with authentication config.
120- func (r * RemoteImageService ) PullImage (image * runtimeapi.ImageSpec , auth * runtimeapi.AuthConfig , podSandboxConfig * runtimeapi.PodSandboxConfig ) (string , error ) {
120+ func (r * ImageService ) PullImage (image * runtimeapi.ImageSpec , auth * runtimeapi.AuthConfig , podSandboxConfig * runtimeapi.PodSandboxConfig ) (string , error ) {
121121 ctx , cancel := getContextWithCancel ()
122122 defer cancel ()
123123
@@ -141,7 +141,7 @@ func (r *RemoteImageService) PullImage(image *runtimeapi.ImageSpec, auth *runtim
141141}
142142
143143// RemoveImage removes the image.
144- func (r * RemoteImageService ) RemoveImage (image * runtimeapi.ImageSpec ) error {
144+ func (r * ImageService ) RemoveImage (image * runtimeapi.ImageSpec ) error {
145145 ctx , cancel := getContextWithTimeout (r .timeout )
146146 defer cancel ()
147147
@@ -157,7 +157,7 @@ func (r *RemoteImageService) RemoveImage(image *runtimeapi.ImageSpec) error {
157157}
158158
159159// ImageFsInfo returns information of the filesystem that is used to store images.
160- func (r * RemoteImageService ) ImageFsInfo () ([]* runtimeapi.FilesystemUsage , error ) {
160+ func (r * ImageService ) ImageFsInfo () ([]* runtimeapi.FilesystemUsage , error ) {
161161 // Do not set timeout, because `ImageFsInfo` takes time.
162162 // TODO(random-liu): Should we assume runtime should cache the result, and set timeout here?
163163 ctx , cancel := getContextWithCancel ()
0 commit comments