func (c *ContainerdUtil) ImageSize(ctn containerd.Container) (int64, error) {
	ctx, cancel := context.WithTimeout(context.Background(), c.queryTimeout)
	defer cancel()
	ctxNamespace := namespaces.WithNamespace(ctx, c.namespace)

	img, err := ctn.Image(ctxNamespace)
	if err != nil {
		return 0, err
	}
	return img.Size(ctxNamespace)
}
// ImageSize interfaces with the containerd api to get the size of an image
ImageSize interfaces with the containerd api to get the size of an image
// ImageSize interfaces with the containerd api to get the size of an image
func (c *ContainerdUtil) ImageSize(ctn containerd.Container) (int64, error) {
	ctx, cancel := context.WithTimeout(context.Background(), c.queryTimeout)
	defer cancel()
	ctxNamespace := namespaces.WithNamespace(ctx, c.namespace)
	img, err := ctn.Image(ctxNamespace)
	if err != nil {
		return 0, err
	}
	return img.Size(ctxNamespace)
}
func ( c * ContainerdUtil ) ImageSize ( ctn containerd . Container ) ( int64 , error ) { ctx , cancel := context . WithTimeout ( context . Background ( ) , c . queryTimeout ) defer cancel ( ) ctxNamespace := namespaces . WithNamespace ( ctx , c . namespace ) img , err := ctn . Image ( ctxNamespace ) if err != nil { return 0 , err } return img . Size ( ctxNamespace ) }
ImageSize interfaces with the containerd api to get the size of an image
ImageSize interfaces with the containerd api to get the size of an image