module

ActiveTorrent::Events

Class methods

frame(event : Event) : String

SSE-фрейм события (W3C event-stream: event/id/data, \n\n — конец). Используется и EventsController'ом — формат один для всех.

Source
publish(name : String, data : String) : Event
Source
replay_after(last_id : Int64) : Array(Event)

Хвост буфера строго после last_id (Last-Event-ID реконнект).

Source
subscribe
Source
torrent_created(torrent : Torrent) : Event
Source
torrent_health(torrent : Torrent) : Event
Source
torrent_payload(torrent : Torrent) : String

карточка из снимка (§5.1) — payload событий created/updated

Source
torrent_retired(torrent : Torrent) : Event
Source
torrent_updated(torrent : Torrent) : Event
Source
unsubscribe(channel : Channel(Event)) : Nil
Source

Nested types