Utility functions. Time/date, some flow control constructs, protocol buffer definitions and codecs, some vector set ops, etc.
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.
Returns true if x and y are roughly equal, such that x/y is within tol of unity.
(body events)
Constructs a message body for a set of events.
Constructs a message body for a set of events.
(custom-attributes event)
Returns a Map of the custom attributes of an Event.
Returns a Map of the custom attributes of an Event.
(decode-inputstream s)
Decode an InputStream to a message. Decodes the protobuf representation of Msg and applies post-load-event to all events.
Decode an InputStream to a message. Decodes the protobuf representation of Msg and applies post-load-event to all events.
(decode-msg msg)
Decode a protobuf to a message. Decodes the protocol buffer 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.
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?
Do a and b (any seqables) have no elements in common?
(encode msg)
Builds and dumps a protobuf message as bytes from a hash.
Builds and dumps a protobuf message as bytes from a hash.
(ensure-event-time e)
Ensures an event has a timestamp.
Ensures an event has a timestamp.
(event opts)
Create a new event from a map.
Create a new event from a map.
(event-to-json event)
Convert an event to a JSON string.
Convert an event to a JSON string.
(exception->event exception)
(exception->event e original)
Creates an event from an Exception.
Creates an event from an Exception.
(expire event)
An expired version of an event.
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.
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.
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
Returns a human-readable string describing things, e.g. importer api1, api2, api4 23 services
(iso8601->unix iso8601)
Transforms ISO8601 strings to unix timestamps.
Transforms ISO8601 strings to unix timestamps.
(localhost)
Returns the local host name.
Returns the local host name.
(map-matches? pat obj)
Does the given map pattern match obj?
Does the given map pattern match obj?
(match pred object)
Does predicate describe object?
Does predicate describe object?
(middle s)
Takes the element at the middle of a seq.
Takes the element at the middle of a seq.
(overlap? a b)
Do a and b (any seqables) have any elements in common?
Do a and b (any seqables) have any elements in common?
(post-load-event e)
After events are loaded, we assign default times if none exist.
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.
Does the given regex match string? Nil if string is nil.
(subject events)
Constructs a subject line for a set of events.
Constructs a subject line for a set of events.
(subset? required s)
Are all elements of required present in seqable s?
Are all elements of required present in seqable s?
(time-at unix-time)
Returns the Date of a unix epoch time.
Returns the Date of a unix epoch time.
(unix-to-iso8601 unix)
Transforms unix time to iso8601 string
Transforms unix time to iso8601 string
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close