You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/11/26 09:00:23 UTC

[GitHub] [skywalking-nodejs] alanlvle commented on a change in pull request #65: Bump up gRPC version, and use its new release repository

alanlvle commented on a change in pull request #65:
URL: https://github.com/apache/skywalking-nodejs/pull/65#discussion_r757329393



##########
File path: src/agent/protocol/grpc/AuthInterceptor.ts
##########
@@ -17,23 +17,14 @@
  *
  */
 
-import * as grpc from 'grpc';
-import { InterceptingCall, Listener, Metadata, Requester } from 'grpc';
+import * as grpc from '@grpc/grpc-js';
 import config from '../../../config/AgentConfig';
 
-type Options = { [key: string]: string | number };
 
-export default function AuthInterceptor(options: Options, nextCall: (options: Options) => InterceptingCall) {
-  return new grpc.InterceptingCall(
-    nextCall(options),
-    new (class implements Requester {
-      // tslint:disable-next-line:ban-types
-      start(metadata: Metadata, listener: Listener, next: Function) {
-        if (config.authorization) {
-          metadata.add('Authentication', config.authorization);
-        }
-        next(metadata, listener);
-      }
-    })(),
-  );
+export default function AuthInterceptor() { 
+  const mata = new grpc.Metadata()
+  if(config.authorization){

Review comment:
       update 3da6ed9155da8a0aebb36569956adae4bf382a02




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org