class Curator::Forwards::Forward

Overview

Responsible for maintaining the websocket connection And sending the event data through to the forward server. Has 2 long running Fibers.

  1. To maintain the forward websocket connection. Polls the connection every second.
  2. To flush the buffer if there is an available connection and data in buffer. Polls the buffer 5000 per second.

Defined in:

forwards/forward.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(url : URI, api_key : String) #

[View source]

Instance Method Detail

def api_key : String #

[View source]

[View source]
def buffer=(buffer : Curator::Utils::RingBuffer) #

[View source]
def push(event : Curator::Event) #

Accepts the event data in a buffer


[View source]
def socket : HTTP::WebSocket | Nil #

[View source]
def socket=(socket : HTTP::WebSocket | Nil) #

[View source]
def url : URI #

[View source]