Class: VectorMCP::Transport::HttpStream::EventStore::Event Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/vector_mcp/transport/http_stream/event_store.rb

Overview

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.

Event data structure

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data



20
21
22
# File 'lib/vector_mcp/transport/http_stream/event_store.rb', line 20

def data
  @data
end

#idObject

Returns the value of attribute id



20
21
22
# File 'lib/vector_mcp/transport/http_stream/event_store.rb', line 20

def id
  @id
end

#session_idObject

Returns the value of attribute session_id



20
21
22
# File 'lib/vector_mcp/transport/http_stream/event_store.rb', line 20

def session_id
  @session_id
end

#stream_idObject

Returns the value of attribute stream_id



20
21
22
# File 'lib/vector_mcp/transport/http_stream/event_store.rb', line 20

def stream_id
  @stream_id
end

#timestampObject

Returns the value of attribute timestamp



20
21
22
# File 'lib/vector_mcp/transport/http_stream/event_store.rb', line 20

def timestamp
  @timestamp
end

#typeObject

Returns the value of attribute type



20
21
22
# File 'lib/vector_mcp/transport/http_stream/event_store.rb', line 20

def type
  @type
end

Instance Method Details

#to_sse_formatObject

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.



21
22
23
24
25
26
27
28
# File 'lib/vector_mcp/transport/http_stream/event_store.rb', line 21

def to_sse_format
  lines = []
  lines << "id: #{id}"
  lines << "event: #{type}" if type
  lines << "data: #{data}"
  lines << ""
  lines.join("\n")
end