Utility functions. Time/date, some flow control constructs, protocol buffer definitions and codecs, some vector set ops, etc.
(approx-equal x y)
(approx-equal x y tol)
Returns true if x and y are roughly equal, such that x/y is within tol of unity.
Constructs a message body for a set of events.
Returns a Map of the custom attributes of an Event.
Decode an InputStream to a message. Decodes the protobuf representation of Msg and applies post-load-event to all events.
Decode a protobuf to a message. Decodes the protocol buffer representation of Msg and applies post-load-event to all events.
(deprecated comment & body)
Wraps body in an implicit (do), and logs a deprecation notice when invoked.
(disjoint? a b)
Do a and b (any seqables) have no elements in common?
Builds and dumps a protobuf message as bytes from a hash.
Ensures an event has a timestamp.
Create a new event from a map.
Convert an event to a JSON string.
(exception->event e original)
Creates an event from an Exception.
An expired version of an event.
(get-hostname [age val])
Fetches the hostname by shelling out to hostname (1), whenever the given age is stale enough. If the given age is recent, as defined by hostname-refresh-interval, returns age and val instead.
How often to allow shelling out to hostname (1), in seconds.
(human-uniq things type)
Returns a human-readable string describing things, e.g.
importer api1, api2, api4 23 services
Transforms ISO8601 strings to unix timestamps.
Returns the local host name.
(map-matches? pat obj)
Does the given map pattern match obj?
(match pred object)
Does predicate describe object?
(member? r s)
Is r present in seqable s?
Takes the element at the middle of a seq.
(overlap? a b)
Do a and b (any seqables) have any elements in common?
Primary key for an event.
After events are loaded, we assign default times if none exist.
(re-matches? re string)
Does the given regex match string? Nil if string is nil.
Constructs a subject line for a set of events.
(subset? required s)
Are all elements of required present in seqable s?
Returns the Date of a unix epoch time.
(truncate s n)
(truncate-bytes s n)
Transforms unix time to iso8601 string