Skip to content

Commit

Permalink
feature: add interceptor lab
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Ou authored and alice890308 committed Mar 5, 2024
1 parent 74e0490 commit 4fd5eb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/comment/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ func runAPI(_ *cobra.Command, _ []string) error {
}
}()

return runkit.GracefulRun(serveGRPC(lis, svc, logger, grpc.UnaryInterceptor(meter.UnaryServerInterceptor())), &args.GracefulConfig)
// add interceptor here to update metrics
// TODO
return runkit.GracefulRun(serveGRPC(lis, svc, logger), &args.GracefulConfig)
}

func serveGRPC(lis net.Listener, svc pb.CommentServer, logger *logkit.Logger, opt ...grpc.ServerOption) runkit.GracefulRunFunc {
Expand Down

0 comments on commit 4fd5eb1

Please sign in to comment.