Set grpc code for unimplemented cri-api methods
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
This commit is contained in:
parent
1ff8df57a5
commit
c6f571fc7d
@ -18,11 +18,12 @@ package sbserver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
)
|
||||
|
||||
func (c *criService) CheckpointContainer(ctx context.Context, r *runtime.CheckpointContainerRequest) (res *runtime.CheckpointContainerResponse, err error) {
|
||||
return nil, errors.New("not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CheckpointContainer not implemented")
|
||||
}
|
||||
|
@ -17,11 +17,11 @@
|
||||
package sbserver
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
)
|
||||
|
||||
func (c *criService) GetContainerEvents(r *runtime.GetEventsRequest, s runtime.RuntimeService_GetContainerEventsServer) error {
|
||||
return errors.New("not implemented")
|
||||
return status.Errorf(codes.Unimplemented, "method GetContainerEvents not implemented")
|
||||
}
|
||||
|
@ -18,11 +18,12 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
)
|
||||
|
||||
func (c *criService) CheckpointContainer(ctx context.Context, r *runtime.CheckpointContainerRequest) (res *runtime.CheckpointContainerResponse, err error) {
|
||||
return nil, errors.New("not implemented")
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CheckpointContainer not implemented")
|
||||
}
|
||||
|
@ -17,11 +17,11 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
runtime "k8s.io/cri-api/pkg/apis/runtime/v1"
|
||||
)
|
||||
|
||||
func (c *criService) GetContainerEvents(r *runtime.GetEventsRequest, s runtime.RuntimeService_GetContainerEventsServer) error {
|
||||
return errors.New("not implemented")
|
||||
return status.Errorf(codes.Unimplemented, "method GetContainerEvents not implemented")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user