titanfe.apps.brick_runner.input module

The INPUT side of a brick (runner)

class titanfe.apps.brick_runner.input.Input(runner)[source]

Bases: object

The Input side of a brick runner requests new packets from the previous BrickRunners OutputServer until it’s QueueLimit is exceeded and again once the “low level” is reached. The Input will also emit queue metrics every 0.1 sec if there are packets in the queue.

Parameters:
  • runner (BrickRunner) – instance of a parent brick runner

  • adress (NetworkAddress) – (host, port) of the source-BrickRunners OutputServer

add_source(source)[source]
add_sources(sources)[source]
async close()[source]

Stop the input

async get()[source]

awaitable to get the next available packet from the input queue

async get_input(address, port_name, target_port)[source]

Connect to and retrieve packets from the given address

handle_input_loss(address, port_name, task)[source]

if we loose a connection to some input source, we handle removing the appropriate task here. Any CancelledError will be ignored, all others Exceptions are unexpected and will be logged.

property is_empty
async put(packet)[source]