sandbox: add update api for controller

Signed-off-by: Abel Feng <fshb1988@gmail.com>
This commit is contained in:
Abel Feng
2024-02-28 10:39:57 +08:00
committed by f00589305
parent e49d3fd1bc
commit 15887d7efc
20 changed files with 1216 additions and 752 deletions

View File

@@ -156,6 +156,14 @@ func (c *Controller) Wait(ctx context.Context, sandboxID string) (sandbox.ExitSt
}
func (c *Controller) Update(
ctx context.Context,
sandboxID string,
sandbox sandbox.Sandbox,
fields ...string) error {
return nil
}
func (c *Controller) waitSandboxExit(ctx context.Context, p *types.PodSandbox, exitCh <-chan containerd.ExitStatus) error {
select {
case e := <-exitCh:

View File

@@ -105,6 +105,14 @@ func (f fakeSandboxController) Metrics(ctx context.Context, sandboxID string) (*
return &types.Metric{}, errdefs.ErrNotImplemented
}
func (f *fakeSandboxController) Update(
ctx context.Context,
sandboxID string,
sandbox sandbox.Sandbox,
fields ...string) error {
return errdefs.ErrNotImplemented
}
type fakeRuntimeService struct {
ocispecs map[string]*oci.Spec
}