class Lnrpc::MacaroonInterceptor

Public Class Methods

new(macaroon_hex) click to toggle source
# File lib/lnrpc/macaroon_interceptor.rb, line 5
def initialize(macaroon_hex)
  @macaroon = macaroon_hex
end

Public Instance Methods

bidi_streamer(request:, call:, method:, metadata:)
client_streamer(request:, call:, method:, metadata:)
inject_macaroon_metadata(request:, call:, method:, metadata:) { || ... } click to toggle source
# File lib/lnrpc/macaroon_interceptor.rb, line 9
def inject_macaroon_metadata(request:, call:, method:, metadata:)
  if !metadata.has_key?('macaroon') && !metadata.has_key?(:macaroon)
    metadata[:macaroon] = @macaroon
  end
  yield
end
request_response(request:, call:, method:, metadata:)
server_streamer(request:, call:, method:, metadata:)