openreplay/mobs/templates/ee~connectors~msgcodec~messages.py.erb
Alexander 5887ab5ddb
Message protocol update (message size) (#663)
* feat(tracker): update message schema with BatchMetadata; separate message-related responsibilities; add message size
* chore(docker): removing edge busybox, as the main repo updated
* feat(backend): updated message protocol templates
* feat(backend): added support of message size
* feat(backend): implemented iterator for new message protocol (with message size)

Co-authored-by: Alex Kaminskii <alex@openreplay.com>
2022-08-22 12:32:48 +02:00

16 lines
409 B
Text

# Auto-generated, do not edit
from abc import ABC
class Message(ABC):
pass
<% $messages.each do |msg| %>
class <%= msg.name %>(Message):
__id__ = <%= msg.id %>
def __init__(self, <%= msg.attributes.map { |attr| "#{attr.name.snake_case}" }.join ", " %>):
<%= msg.attributes.map { |attr| "self.#{attr.name.snake_case} = #{attr.name.snake_case}" }.join "\n "
%>
<% end %>