Class: Gruf::Lightstep::Method

Inherits:
Object
  • Object
show all
Defined in:
lib/gruf/lightstep/method.rb

Overview

Represents a Gruf gRPC method call

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(active_call, signature, request) ⇒ Method

Returns a new instance of Method.

Parameters:

  • active_call (GRPC::ActiveCall)

    The gRPC ActiveCall object for this method

  • signature (String|Symbol)

    The method signature being called

  • request (Object)

    The gRPC request object being used



31
32
33
34
35
# File 'lib/gruf/lightstep/method.rb', line 31

def initialize(active_call, signature, request)
  @active_call = active_call
  @signature = signature.to_s
  @request = request
end

Instance Attribute Details

#active_callObject (readonly)

Returns the value of attribute active_call.



24
25
26
# File 'lib/gruf/lightstep/method.rb', line 24

def active_call
  @active_call
end

#requestObject (readonly)

Returns the value of attribute request.



24
25
26
# File 'lib/gruf/lightstep/method.rb', line 24

def request
  @request
end

#signatureObject (readonly)

Returns the value of attribute signature.



24
25
26
# File 'lib/gruf/lightstep/method.rb', line 24

def signature
  @signature
end

Instance Method Details

#headersGruf::Lightstep::Headers



40
41
42
# File 'lib/gruf/lightstep/method.rb', line 40

def headers
  @headers ||= Gruf::Lightstep::Headers.new(@active_call)
end

#request_classString

Returns:

  • (String)


47
48
49
# File 'lib/gruf/lightstep/method.rb', line 47

def request_class
  @request.class.to_s
end