mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-10-18 11:21:46 +00:00
chore(deps): remove direct dependency on github.com/grpc-ecosystem/go-grpc-middleware (v1)
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -5,11 +5,11 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/fullstorydev/grpchan/inprocgrpc"
|
||||
grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
"google.golang.org/grpc"
|
||||
insecure2 "google.golang.org/grpc/credentials/insecure"
|
||||
|
||||
"go.linka.cloud/grpc-toolkit/interceptors"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors/chain"
|
||||
"go.linka.cloud/grpc-toolkit/interceptors/metadata"
|
||||
)
|
||||
|
||||
@@ -34,10 +34,10 @@ func (s *service) wrapCC() grpc.ClientConnInterface {
|
||||
}
|
||||
w := &client{ch: s.inproc, c: c}
|
||||
if len(s.opts.unaryClientInterceptors) != 0 {
|
||||
w.ui = grpc_middleware.ChainUnaryClient(s.opts.unaryClientInterceptors...)
|
||||
w.ui = chain.UnaryClient(s.opts.unaryClientInterceptors...)
|
||||
}
|
||||
if len(s.opts.streamClientInterceptors) != 0 {
|
||||
w.si = grpc_middleware.ChainStreamClient(s.opts.streamClientInterceptors...)
|
||||
w.si = chain.StreamClient(s.opts.streamClientInterceptors...)
|
||||
}
|
||||
return w
|
||||
}
|
||||
|
@@ -16,7 +16,6 @@ import (
|
||||
|
||||
"github.com/fullstorydev/grpchan/inprocgrpc"
|
||||
"github.com/google/uuid"
|
||||
grpcmiddleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
||||
"github.com/justinas/alice"
|
||||
"github.com/pires/go-proxyproto"
|
||||
"github.com/rs/cors"
|
||||
@@ -30,6 +29,7 @@ import (
|
||||
"google.golang.org/grpc/health/grpc_health_v1"
|
||||
greflect "google.golang.org/grpc/reflection"
|
||||
|
||||
"go.linka.cloud/grpc-toolkit/interceptors/chain"
|
||||
"go.linka.cloud/grpc-toolkit/internal/injectlogger"
|
||||
"go.linka.cloud/grpc-toolkit/logger"
|
||||
"go.linka.cloud/grpc-toolkit/registry"
|
||||
@@ -128,10 +128,10 @@ func newService(opts ...Option) (*service, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ui := grpcmiddleware.ChainUnaryServer(s.opts.unaryServerInterceptors...)
|
||||
ui := chain.UnaryServer(s.opts.unaryServerInterceptors...)
|
||||
s.inproc = s.inproc.WithServerUnaryInterceptor(ui)
|
||||
|
||||
si := grpcmiddleware.ChainStreamServer(s.opts.streamServerInterceptors...)
|
||||
si := chain.StreamServer(s.opts.streamServerInterceptors...)
|
||||
s.inproc = s.inproc.WithServerStreamInterceptor(si)
|
||||
|
||||
gopts := []grpc.ServerOption{
|
||||
|
Reference in New Issue
Block a user