containerd-stress: add support for running through CRI

Introduce a --cri flag, which will enable running container-stress using the CRI,
instead of containerd's task API.

In doing so, we introduce cri_worker, rename the existing worker to ctr_worker, and introduce
a worker interface that each of these implement.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
This commit is contained in:
Eric Ernst
2022-04-13 13:39:29 -07:00
parent 14af2bdfa3
commit 52593cfc86
4 changed files with 308 additions and 17 deletions

View File

@@ -31,7 +31,7 @@ import (
)
type execWorker struct {
worker
ctrWorker
}
func (w *execWorker) exec(ctx, tctx context.Context) {