Add instrumented service.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2017-08-22 05:32:10 +00:00
parent 7901f56367
commit 195b52500f
23 changed files with 299 additions and 163 deletions

View File

@@ -17,7 +17,6 @@ limitations under the License.
package server
import (
"github.com/golang/glog"
"golang.org/x/net/context"
"k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
@@ -27,14 +26,7 @@ import (
// ListImages lists existing images.
// TODO(random-liu): Add image list filters after CRI defines this more clear, and kubelet
// actually needs it.
func (c *criContainerdService) ListImages(ctx context.Context, r *runtime.ListImagesRequest) (retRes *runtime.ListImagesResponse, retErr error) {
glog.V(5).Infof("ListImages with filter %+v", r.GetFilter())
defer func() {
if retErr == nil {
glog.V(5).Infof("ListImages returns image list %+v", retRes.GetImages())
}
}()
func (c *criContainerdService) ListImages(ctx context.Context, r *runtime.ListImagesRequest) (*runtime.ListImagesResponse, error) {
imagesInStore := c.imageStore.List()
var images []*runtime.Image