mirror of
https://github.com/containers/podman.git
synced 2025-11-29 17:48:05 +08:00
Add a bare minimum GRPC service to the podman system service socket. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
27 lines
522 B
Go
27 lines
522 B
Go
//go:build !remote
|
|
|
|
package grpc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/containers/podman/v6/libpod"
|
|
"github.com/containers/podman/v6/pkg/api/grpcpb"
|
|
)
|
|
|
|
type noopServer struct {
|
|
grpcpb.UnimplementedNoopServer
|
|
runtime *libpod.Runtime
|
|
}
|
|
|
|
func (noopServer) Noop(_ context.Context, req *grpcpb.NoopRequest) (*grpcpb.NoopResponse, error) {
|
|
resp := &grpcpb.NoopResponse{
|
|
Ignored: req.GetIgnored(),
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func NewNoopServer(runtime *libpod.Runtime) grpcpb.NoopServer {
|
|
return &noopServer{runtime: runtime}
|
|
}
|