28
pkg/cri/sbserver/container_checkpoint.go
Normal file
28
pkg/cri/sbserver/container_checkpoint.go
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
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 sbserver
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
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")
|
||||
}
|
||||
27
pkg/cri/sbserver/container_events.go
Normal file
27
pkg/cri/sbserver/container_events.go
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
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 sbserver
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
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")
|
||||
}
|
||||
@@ -1601,6 +1601,41 @@ func (in *instrumentedAlphaService) ReopenContainerLog(ctx context.Context, r *r
|
||||
return res, errdefs.ToGRPC(err)
|
||||
}
|
||||
|
||||
func (in *instrumentedService) CheckpointContainer(ctx context.Context, r *runtime.CheckpointContainerRequest) (res *runtime.CheckpointContainerResponse, err error) {
|
||||
if err := in.checkInitialized(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
log.G(ctx).WithError(err).Errorf("CheckpointContainer failed, error")
|
||||
} else {
|
||||
log.G(ctx).Debug("CheckpointContainer returns successfully")
|
||||
}
|
||||
}()
|
||||
|
||||
res, err = in.c.CheckpointContainer(ctx, r)
|
||||
return res, errdefs.ToGRPC(err)
|
||||
}
|
||||
|
||||
func (in *instrumentedService) GetContainerEvents(r *runtime.GetEventsRequest, s runtime.RuntimeService_GetContainerEventsServer) (err error) {
|
||||
if err := in.checkInitialized(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx := s.Context()
|
||||
defer func() {
|
||||
if err != nil {
|
||||
log.G(ctx).WithError(err).Errorf("GetContainerEvents failed, error")
|
||||
} else {
|
||||
log.G(ctx).Debug("GetContainerEvents returns successfully")
|
||||
}
|
||||
}()
|
||||
|
||||
err = in.c.GetContainerEvents(r, s)
|
||||
return errdefs.ToGRPC(err)
|
||||
}
|
||||
|
||||
func alphaReqToV1Req(
|
||||
alphar interface{ Marshal() ([]byte, error) },
|
||||
v1r interface{ Unmarshal(_ []byte) error },
|
||||
|
||||
28
pkg/cri/server/container_checkpoint.go
Normal file
28
pkg/cri/server/container_checkpoint.go
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
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 server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
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")
|
||||
}
|
||||
27
pkg/cri/server/container_events.go
Normal file
27
pkg/cri/server/container_events.go
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
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 server
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
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")
|
||||
}
|
||||
@@ -1601,6 +1601,41 @@ func (in *instrumentedAlphaService) ReopenContainerLog(ctx context.Context, r *r
|
||||
return res, errdefs.ToGRPC(err)
|
||||
}
|
||||
|
||||
func (in *instrumentedService) CheckpointContainer(ctx context.Context, r *runtime.CheckpointContainerRequest) (res *runtime.CheckpointContainerResponse, err error) {
|
||||
if err := in.checkInitialized(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
log.G(ctx).WithError(err).Errorf("CheckpointContainer failed, error")
|
||||
} else {
|
||||
log.G(ctx).Debug("CheckpointContainer returns successfully")
|
||||
}
|
||||
}()
|
||||
|
||||
res, err = in.c.CheckpointContainer(ctx, r)
|
||||
return res, errdefs.ToGRPC(err)
|
||||
}
|
||||
|
||||
func (in *instrumentedService) GetContainerEvents(r *runtime.GetEventsRequest, s runtime.RuntimeService_GetContainerEventsServer) (err error) {
|
||||
if err := in.checkInitialized(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx := s.Context()
|
||||
defer func() {
|
||||
if err != nil {
|
||||
log.G(ctx).WithError(err).Errorf("GetContainerEvents failed, error")
|
||||
} else {
|
||||
log.G(ctx).Debug("GetContainerEvents returns successfully")
|
||||
}
|
||||
}()
|
||||
|
||||
err = in.c.GetContainerEvents(r, s)
|
||||
return errdefs.ToGRPC(err)
|
||||
}
|
||||
|
||||
func alphaReqToV1Req(
|
||||
alphar interface{ Marshal() ([]byte, error) },
|
||||
v1r interface{ Unmarshal(_ []byte) error },
|
||||
|
||||
Reference in New Issue
Block a user