fathom.FactStore¶
fathom.FactStore
¶
Bases: Protocol
Protocol defining the async fact-storage interface.
Source code in src/fathom/fleet.py
assert_fact(template, data)
async
¶
query(template, fact_filter=None)
async
¶
retract(template, fact_filter=None)
async
¶
count(template, fact_filter=None)
async
¶
subscribe(template, callback)
async
¶
Subscribe to changes on a template. Return an unsubscribe callable.
A change is delivered once to each subscriber. A callback that raises is logged and skipped: it never fails the write that caused the change, and it never ends the subscription or reaches the other subscribers.