Maintains a stateful index of events by [host, service] key. Can be queried to return the most recent indexed events matching some expression. Can expire events which have exceeded their TTL. Presently the only implementation of the index protocol is backed by a nonblockinghashmap, but I plan to add an HSQLDB backend as well.
Indexes must extend three protocols:
- Index: indexing and querying events
- Seqable: returning a list of events
- Service: lifecycle management
Resets the index
(delete this event)
Deletes any event with this host & service from index. Returns the deleted event, or nil.
(delete-exactly this event)
Deletes event from index. Returns the deleted event, or nil.
Return a seq of expired states from this index, removing each.
(insert this event)
Updates index with event
(lookup this host service)
Lookup an indexed event from the index
(search this query-ast)
Returns a seq of events from the index matching this query AST
Create a new index (currently: an nhbm index)
Create a new nonblockinghashmap backed index
Check if the AST is only searching for the host and service
(update index-instance event)