Merge pull request #7345 from zouyee/red
delete redundent import alias and and type conversion
This commit is contained in:
commit
3d7a93fed8
@ -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)
|
||||
|
@ -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,
|
||||
)),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user