Skip to content

Instantly share code, notes, and snippets.

@jdwyah
Created February 22, 2019 19:47
Show Gist options
  • Save jdwyah/80ea8eb3c2feb0d7d73155340a0446de to your computer and use it in GitHub Desktop.
Save jdwyah/80ea8eb3c2feb0d7d73155340a0446de to your computer and use it in GitHub Desktop.
module EzConfig
class CallInterceptor < GRPC::ClientInterceptor
def cancel!
@call.instance_variable_get("@wrapped").instance_variable_get("@call").cancel
end
def server_streamer(request:, call:, method:, metadata:, &block)
@call = call
yield
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment