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

Returns:

  • (Object)

    the current value of 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

Returns:

  • (Object)

    the current value of id



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

def id
  @id
end

#timestampObject

Returns the value of attribute timestamp

Returns:

  • (Object)

    the current value of 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

Returns:

  • (Object)

    the current value of 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