func (r *serverRouter) UnaryResolver() grpc.UnaryServerInterceptor {
	return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
		// TODO: Find a more efficient way to chain the interceptors
		interceptor := NewUnaryServerInterceptor()
		_, err := resolveServerInterceptor(info.FullMethod, r.interceptors, func(lvl ServerInterceptor) {
			interceptor.AddInterceptor(lvl.UnaryServerInterceptor())
		}, false)
		if err != nil {
			return nil, grpc.Errorf(codes.Internal, err.Error())
		}
		return interceptor.Interceptor()(ctx, req, info, handler)
	}
}
// UnaryResolver returns a `grpc.UnaryServerInterceptor` that uses the
// appropriate chain of interceptors with the given gRPC request.
UnaryResolver returns a `grpc.UnaryServerInterceptor` that uses the
appropriate chain of interceptors with the given gRPC request.
// UnaryResolver returns a ` grpc . UnaryServerInterceptor ` that uses the // appropriate chain of interceptors with the given gRPC request .
func (r *serverRouter) UnaryResolver() grpc.UnaryServerInterceptor {
	return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
		interceptor := NewUnaryServerInterceptor()
		_, err := resolveServerInterceptor(info.FullMethod, r.interceptors, func(lvl ServerInterceptor) {
			interceptor.AddInterceptor(lvl.UnaryServerInterceptor())
		}, false)
		if err != nil {
			return nil, grpc.Errorf(codes.Internal, err.Error())
		}
		return interceptor.Interceptor()(ctx, req, info, handler)
	}
}
func ( r * serverRouter ) UnaryResolver ( ) grpc . UnaryServerInterceptor { return func ( ctx context . Context , req interface { } , info * grpc . UnaryServerInfo , handler grpc . UnaryHandler ) ( interface { } , error ) { interceptor := NewUnaryServerInterceptor ( ) _ , err := resolveServerInterceptor ( info . FullMethod , r . interceptors , func ( lvl ServerInterceptor ) { interceptor . AddInterceptor ( lvl . UnaryServerInterceptor ( ) ) } , false ) if err != nil { return nil , grpc . Errorf ( codes . Internal , err . Error ( ) ) } return interceptor . Interceptor ( ) ( ctx , req , info , handler ) } }
UnaryResolver returns a `grpc.UnaryServerInterceptor` that uses the
appropriate chain of interceptors with the given gRPC request.
UnaryResolver returns a ` grpc . UnaryServerInterceptor ` that uses the appropriate chain of interceptors with the given gRPC request .
// TODO: Find a more efficient way to chain the interceptors