// ImageFsInfo returns status about the filesystem that images are stored on
ImageFsInfo returns status about the filesystem that images are stored on
// ImageFsInfo returns status about the filesystem that images are stored on
func (s *ImageService) ImageFsInfo(ctx context.Context, _ *runtimeapi.ImageFsInfoRequest) (*runtimeapi.ImageFsInfoResponse, error) {
	info, err := s.client.Info(ctx)
	if err != nil {
		return nil, err
	}
	usageInfo, err := fs.GetDirUsage(info.DockerRootDir)
	if err != nil {
		return nil, err
	}
	return &runtimeapi.ImageFsInfoResponse{
		ImageFilesystems: []*runtimeapi.FilesystemUsage{
			{
				Timestamp:  time.Now().UnixNano(),
				FsId:       &runtimeapi.FilesystemIdentifier{Mountpoint: info.DockerRootDir},
				UsedBytes:  &runtimeapi.UInt64Value{Value: usageInfo.Bytes},
				InodesUsed: &runtimeapi.UInt64Value{Value: usageInfo.Inodes},
			},
		},
	}, nil
}
func ( s * ImageService ) ImageFsInfo ( ctx context . Context , _ * runtimeapi . ImageFsInfoRequest ) ( * runtimeapi . ImageFsInfoResponse , error ) { info , err := s . client . Info ( ctx ) if err != nil { return nil , err } usageInfo , err := fs . GetDirUsage ( info . DockerRootDir ) if err != nil { return nil , err } return & runtimeapi . ImageFsInfoResponse { ImageFilesystems : [ ] * runtimeapi . FilesystemUsage { { Timestamp : time . Now ( ) . UnixNano ( ) , FsId : & runtimeapi . FilesystemIdentifier { Mountpoint : info . DockerRootDir } , UsedBytes : & runtimeapi . UInt64Value { Value : usageInfo . Bytes } , InodesUsed : & runtimeapi . UInt64Value { Value : usageInfo . Inodes } , } , } , } , nil }
ImageFsInfo returns status about the filesystem that images are stored on
ImageFsInfo returns status about the filesystem that images are stored on