Class: EnvelopeWrapperBase
- Inherits:
-
Object
- Object
- EnvelopeWrapperBase
show all
- Defined in:
- lib/rookout/com_ws/envelope_wrapper.rb
Instance Method Summary
collapse
Instance Method Details
#calculate_size ⇒ Object
18
19
20
|
# File 'lib/rookout/com_ws/envelope_wrapper.rb', line 18
def calculate_size
raise NotImplementedError
end
|
#envelope ⇒ Object
14
15
16
|
# File 'lib/rookout/com_ws/envelope_wrapper.rb', line 14
def envelope
raise NotImplementedError
end
|
#wrap_in_envelope(message) ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/rookout/com_ws/envelope_wrapper.rb', line 6
def wrap_in_envelope message
any_message = Google::Protobuf::Any.pack message
timestamp = Google::Protobuf::Timestamp.new
timestamp.from_time Time.new
envelope = Com::Rookout::Envelope.new msg: any_message, timestamp: timestamp
Com::Rookout::Envelope.encode envelope
end
|