Liking cljdoc? Tell your friends :D

riemann.common

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

approx-equalclj

(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.
sourceraw docstring

bodyclj

(body events)

Constructs a message body for a set of events.

Constructs a message body for a set of events.
sourceraw docstring

count-character-bytesclj

(count-character-bytes c)
source

count-string-bytesclj

(count-string-bytes s)
source

custom-attributesclj

(custom-attributes event)

Returns a Map of the custom attributes of an Event.

Returns a Map of the custom attributes of an Event.
sourceraw docstring

decode-inputstreamclj

(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.
sourceraw docstring

decode-msgclj

(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.
sourceraw docstring

deprecatedcljmacro

(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.
sourceraw docstring

deprecations-emittedclj

source

disjoint?clj

(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?
sourceraw docstring

encodeclj

(encode msg)

Builds and dumps a protobuf message as bytes from a hash.

Builds and dumps a protobuf message as bytes from a hash.
sourceraw docstring

ensure-event-timeclj

(ensure-event-time e)

Ensures an event has a timestamp.

Ensures an event has a timestamp.
sourceraw docstring

eventclj

(event opts)

Create a new event from a map.

Create a new event from a map.
sourceraw docstring

event-to-jsonclj

(event-to-json event)

Convert an event to a JSON string.

Convert an event to a JSON string.
sourceraw docstring

exception->eventclj

(exception->event exception)
(exception->event e original)

Creates an event from an Exception.

Creates an event from an Exception.
sourceraw docstring

expireclj

(expire event)

An expired version of an event.

An expired version of an event.
sourceraw docstring

get-hostnameclj

(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.
sourceraw docstring

hostname-refresh-intervalclj

How often to allow shelling out to hostname (1), in seconds.

How often to allow shelling out to hostname (1), in seconds.
sourceraw docstring

human-uniqclj

(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
sourceraw docstring

iso8601->unixclj

(iso8601->unix iso8601)

Transforms ISO8601 strings to unix timestamps.

Transforms ISO8601 strings to unix timestamps.
sourceraw docstring

localhostclj

(localhost)

Returns the local host name.

Returns the local host name.
sourceraw docstring

map-matches?clj

(map-matches? pat obj)

Does the given map pattern match obj?

Does the given map pattern match obj?
sourceraw docstring

Matchcljprotocol

matchclj

(match pred object)

Does predicate describe object?

Does predicate describe object?
source

member?clj

(member? r s)

Is r present in seqable s?

Is r present in seqable s?
sourceraw docstring

middleclj

(middle s)

Takes the element at the middle of a seq.

Takes the element at the middle of a seq.
sourceraw docstring

overlap?clj

(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?
sourceraw docstring

pkeyclj

(pkey event)

Primary key for an event.

Primary key for an event.
sourceraw docstring

post-load-eventclj

(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.
sourceraw docstring

re-matches?clj

(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.
sourceraw docstring

subjectclj

(subject events)

Constructs a subject line for a set of events.

Constructs a subject line for a set of events.
sourceraw docstring

subset?clj

(subset? required s)

Are all elements of required present in seqable s?

Are all elements of required present in seqable s?
sourceraw docstring

time-atclj

(time-at unix-time)

Returns the Date of a unix epoch time.

Returns the Date of a unix epoch time.
sourceraw docstring

truncateclj

(truncate s n)
source

truncate-bytesclj

(truncate-bytes s n)
source

unix-to-iso8601clj

(unix-to-iso8601 unix)

Transforms unix time to iso8601 string

Transforms unix time to iso8601 string
sourceraw docstring

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

× close