Class: Hoss::Transport::Serializers::Container Private
- Inherits:
-
Object
- Object
- Hoss::Transport::Serializers::Container
- Defined in:
- lib/hoss/transport/serializers.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #error ⇒ Object readonly private
- #event ⇒ Object readonly private
- #metadata ⇒ Object readonly private
- #metricset ⇒ Object readonly private
- #report ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(config) ⇒ Container
constructor
private
A new instance of Container.
- #serialize(resource) ⇒ Object private
Constructor Details
#initialize(config) ⇒ Container
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Container.
66 67 68 69 70 71 72 73 74 |
# File 'lib/hoss/transport/serializers.rb', line 66 def initialize(config) # @transaction = Serializers::TransactionSerializer.new(config) # @span = Serializers::SpanSerializer.new(config) @report = Serializers::ReportSerializer.new(config) @event = Serializers::EventSerializer.new(config) @error = Serializers::ErrorSerializer.new(config) = Serializers::MetadataSerializer.new(config) # @metricset = Serializers::MetricsetSerializer.new(config) end |
Instance Attribute Details
#error ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
76 77 78 |
# File 'lib/hoss/transport/serializers.rb', line 76 def error @error end |
#event ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
76 77 78 |
# File 'lib/hoss/transport/serializers.rb', line 76 def event @event end |
#metadata ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
76 77 78 |
# File 'lib/hoss/transport/serializers.rb', line 76 def end |
#metricset ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
76 77 78 |
# File 'lib/hoss/transport/serializers.rb', line 76 def metricset @metricset end |
#report ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
76 77 78 |
# File 'lib/hoss/transport/serializers.rb', line 76 def report @report end |
Instance Method Details
#serialize(resource) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/hoss/transport/serializers.rb', line 77 def serialize(resource) case resource # when Transaction # transaction.build(resource) # when Span # span.build(resource) when Report report.build(resource) when Event event.build(resource) when Error error.build(resource) # when Metricset # metricset.build(resource) when Metadata .build(resource) else raise UnrecognizedResource, resource.inspect end end |