Merge pull request #7345 from zouyee/red

delete redundent import alias and and type conversion
This commit is contained in:
Phil Estes 2022-09-01 16:03:08 -04:00 committed by GitHub
commit 3d7a93fed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -185,8 +185,8 @@ can be used and modified as necessary as a custom configuration.`
// run server initialization in a goroutine so we don't end up blocking important things like SIGTERM handling
// while the server is initializing.
// As an example opening the bolt database will block forever if another containerd is already running and containerd
// will have to be be `kill -9`'ed to recover.
// As an example, opening the bolt database blocks forever if a containerd instance
// is already running, which must then be forcibly terminated (SIGKILL) to recover.
chsrv := make(chan srvResp)
go func() {
defer close(chsrv)

View File

@ -49,7 +49,7 @@ import (
ssproxy "github.com/containerd/containerd/snapshots/proxy"
"github.com/containerd/containerd/sys"
"github.com/containerd/ttrpc"
metrics "github.com/docker/go-metrics"
"github.com/docker/go-metrics"
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
@ -121,12 +121,12 @@ func New(ctx context.Context, config *srvconfig.Config) (*Server, error) {
serverOpts := []grpc.ServerOption{
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
otelgrpc.StreamServerInterceptor(),
grpc.StreamServerInterceptor(grpc_prometheus.StreamServerInterceptor),
grpc_prometheus.StreamServerInterceptor,
streamNamespaceInterceptor,
)),
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
otelgrpc.UnaryServerInterceptor(),
grpc.UnaryServerInterceptor(grpc_prometheus.UnaryServerInterceptor),
grpc_prometheus.UnaryServerInterceptor,
unaryNamespaceInterceptor,
)),
}