Liking cljdoc? Tell your friends :D

riemann.index

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
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
raw docstring

default-ttlclj

source

indexclj

(index)

Create a new index (currently: an nhbm index)

Create a new index (currently: an nhbm index)
sourceraw docstring

Indexcljprotocol

clearclj

(clear this)

Resets the index

Resets the index

deleteclj

(delete this event)

Deletes any event with this host & service from index. Returns the deleted event, or nil.

Deletes any event with this host & service from index. Returns the deleted
event, or nil.

delete-exactlyclj

(delete-exactly this event)

Deletes event from index. Returns the deleted event, or nil.

Deletes event from index. Returns the deleted event, or nil.

expireclj

(expire this)

Return a seq of expired states from this index, removing each.

Return a seq of expired states from this index, removing each.

insertclj

(insert this event)

Updates index with event

Updates index with event

lookupclj

(lookup this host service)

Lookup an indexed event from the index

Lookup an indexed event from the index

searchclj

(search this query-ast)

Returns a seq of events from the index matching this query AST

Returns a seq of events from the index matching this query AST
source

nbhm-indexclj

(nbhm-index)

Create a new nonblockinghashmap backed index

Create a new nonblockinghashmap backed index
sourceraw docstring

query-for-host-and-serviceclj

(query-for-host-and-service query-ast)

Check if the AST is only searching for the host and service

Check if the AST is only searching for the host and service
sourceraw docstring

updateclj

(update index-instance event)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close