Liking cljdoc? Tell your friends :D

riemann.expiration

Many places in Riemann need to understand whether the events they're working with are currently valid, and whether a given host/service combo has expired. The expiration tracker provides a stateful data structure for tracking new events, figuring out when expirations should be emitted, and calling back when they need to occur.

Many places in Riemann need to understand whether the events they're working
with are currently valid, and whether a given host/service combo has expired.
The expiration tracker provides a stateful data structure for tracking new
events, figuring out when expirations should be emitted, and calling back
when they need to occur.
raw docstring

expiration-timeclj

(expiration-time event)

When will an event expire?

When will an event expire?
sourceraw docstring

expired?clj

(expired? event)

Is this event expired? Events are expired if their state is "expired" and time is past, if their time + ttl is less than the current time.

Is this event expired? Events are expired if their state is "expired" and
time is past, if their time + ttl is less than the current time.
sourceraw docstring

Trackercljprotocol

expired-events!clj

(expired-events! t)

Returns a seq of expired events, which are deleted from the tracker as they're yielded.

Returns a seq of expired events, which are
deleted from the tracker as they're yielded.

shutdown!clj

(shutdown! t)

Release resources associated with the tracker.

Release resources associated with the tracker.

update!clj

(update! t event)

Update a tracker with a new event.

Update a tracker with a new event.
source

tracker!clj

(tracker! expired-sink)
(tracker! expired-sink expiration-interval)

Constructs a new expiration tracker which expires events every expiration-interval seconds, calling (expired-sink event) with each.

Constructs a new expiration tracker which expires events every
expiration-interval seconds, calling (expired-sink event) with each.
sourceraw docstring

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

× close