pytak.QueueWorker
- class pytak.QueueWorker(queue: Queue | Queue, config: None | SectionProxy | dict)
Read non-CoT Messages from an async network client.
(asyncio.Protocol or similar async network client) Serializes it as COT, and puts it onto an asyncio.Queue.
Implementations should handle serializing messages as COT Events, and putting them onto the event_queue.
The event_queue is handled by the pytak.EventWorker Class.
pytak([asyncio.Protocol]->[pytak.MessageWorker]->[asyncio.Queue])
- __init__(queue: Queue | Queue, config: None | SectionProxy | dict) None
Initialize a Worker instance.
Methods
__init__(queue, config)Initialize a Worker instance.
fts_compat()Apply FreeTAKServer (FTS) compatibility.
handle_data(data)Handle data (placeholder method, please override).
put_queue(data[, queue_arg])Put Data onto the Queue.
run([number_of_iterations])Run this Thread, reads Data from Queue & passes data to next Handler.