Sandbox: Add Metrics rpc for controller

As a follow up change to adding a SandboxMetrics rpc to the core
sandbox service, the controller needed a corresponding rpc for CRI
and others to eventually implement.

This leaves the CRI (non-shim mode) controller unimplemented just to
have a change with the API addition to start.

Signed-off-by: Danny Canter <danny@dcantah.dev>
This commit is contained in:
Danny Canter
2023-06-13 00:24:09 -07:00
parent d56722ef2a
commit d278d37caa
9 changed files with 567 additions and 284 deletions

View File

@@ -100,6 +100,8 @@ type Controller interface {
Status(ctx context.Context, sandboxID string, verbose bool) (ControllerStatus, error)
// Shutdown deletes and cleans all tasks and sandbox instance.
Shutdown(ctx context.Context, sandboxID string) error
// Metrics queries the sandbox for metrics.
Metrics(ctx context.Context, sandboxID string) (*types.Metric, error)
}
type ControllerInstance struct {