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:
29
pkg/cri/sbserver/podsandbox/sandbox_stats.go
Normal file
29
pkg/cri/sbserver/podsandbox/sandbox_stats.go
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
Copyright The containerd Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package podsandbox
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/containerd/containerd/api/types"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
)
|
||||
|
||||
// TODO(dcantah): Implement metrics to be used for SandboxStats rpc.
|
||||
func (c *Controller) Metrics(ctx context.Context, sandboxID string) (*types.Metric, error) {
|
||||
return nil, errdefs.ErrNotImplemented
|
||||
}
|
||||
Reference in New Issue
Block a user