From 8103db60de5f75a363296cc0d257d003a7a34dd7 Mon Sep 17 00:00:00 2001 From: Vincent Woo Date: Fri, 26 Oct 2018 14:02:32 -0700 Subject: [PATCH] Show how macaroon interceptor can work with streaming gRPC in Ruby doc --- docs/grpc/ruby.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/grpc/ruby.md b/docs/grpc/ruby.md index 0a6dcfc21..5725707af 100644 --- a/docs/grpc/ruby.md +++ b/docs/grpc/ruby.md @@ -146,6 +146,11 @@ class MacaroonInterceptor < GRPC::ClientInterceptor metadata['macaroon'] = macaroon yield end + + def server_streamer(request:, call:, method:, metadata:) + metadata['macaroon'] = macaroon + yield + end end ```