Liking cljdoc? Tell your friends :D

riemann.core

Binds together an index, servers, and streams.

Binds together an index, servers, and streams.
raw docstring

conj-serviceclj

(conj-service core service)
(conj-service core service force?)

Adds a service to a core. Throws if any existing services would conflict. If force? is passed, dissoc's any conflicting services.

Adds a service to a core. Throws if any existing services would conflict. If
force? is passed, dissoc's any conflicting services.
sourceraw docstring

coreclj

(core)

Create a new core.

Create a new core.
sourceraw docstring

core-servicesclj

(core-services core)

All services in a core--both the :services list and named services like the index.

All services in a core--both the :services list and named services like the
index.
sourceraw docstring

delete-from-indexclj

(delete-from-index core event)
(delete-from-index core fields event)

Deletes similar events from the index. By default, deletes events with the same host and service. If a field, or a list of fields, is given, deletes any events with matching values for all of those fields.

; Delete all events in the index with the same host (delete-from-index index :host event)

; Delete all events in the index with the same host and state. (delete-from-index index [:host :state] event)

Deletes similar events from the index. By default, deletes events with the
same host and service. If a field, or a list of fields, is given, deletes any
events with matching values for all of those fields.

; Delete all events in the index with the same host
(delete-from-index index :host event)

; Delete all events in the index with the same host and state.
(delete-from-index index [:host :state] event)
sourceraw docstring

instrumentation-serviceclj

(instrumentation-service opts)

Returns a service which samples instrumented services in its core every interval seconds, and sends their events to the core itself.

Returns a service which samples instrumented services in its core every
interval seconds, and sends their events to the core itself.
sourceraw docstring

merge-coresclj

(merge-cores old-core new-core)

Merge cores old-core and new-core into a new core comprised of services from :new-core or their equivalents from :old-core where possible.

Merge cores old-core and new-core into a new core comprised of services from
:new-core or their equivalents from :old-core where possible.
sourceraw docstring

reaperclj

(reaper)
(reaper interval)
(reaper interval opts)

Returns a service which expires states from its core's index every interval (default 10) seconds. Expired events are streamed to the core's streams. The streamed states have only the host and service copied, current time, and state expired. Expired events from the index are also published to the "index" pubsub channel.

Options:

:keep-keys A list of event keys which should be preserved from the indexed event in the expired event. Defaults to [:host :service], which means that when an event expires, its :host and :service are copied to a new event, but no other keys are preserved. If :keep-keys is :all, all event keys will be preserved. The state of an expired event is always "expired", and its time is always the time that the event expired.

Returns a service which expires states from its core's index every interval
(default 10) seconds. Expired events are streamed to the core's streams. The
streamed states have only the host and service copied, current time, and
state expired. Expired events from the index are also published to the
"index" pubsub channel.

Options:

:keep-keys A list of event keys which should be preserved from the indexed
           event in the expired event. Defaults to [:host :service], which
           means that when an event expires, its :host and :service are
           copied to a new event, but no other keys are preserved.
           If :keep-keys is :all, all event keys will be preserved.
           The state of an expired event is always "expired", and its time
           is always the time that the event expired.
sourceraw docstring

start!clj

(start! core)

Start the given core. Reloads and starts all services.

Start the given core. Reloads and starts all services.
sourceraw docstring

stop!clj

(stop! core)

Stops the given core and all services.

Stops the given core and all services.
sourceraw docstring

stream!clj

(stream! core event)

Applies an event to the streams in this core.

Applies an event to the streams in this core.
sourceraw docstring

transition!clj

(transition! old-core new-core)

A core transition "merges" one core into another. Cores are immutable, but the stateful resources associated with them aren't. When you call (transition! old-core new-core), we:

  1. Stop old core services without an equivalent in the new core.

  2. Merge the new core's services with equivalents from the old core.

  3. Reload all services with the merged core.

  4. Start all services in the merged core.

Finally, we return the merged core. old-core and new-core can be discarded.

A core transition "merges" one core into another. Cores are immutable,
but the stateful resources associated with them aren't. When you call
(transition! old-core new-core), we:

1. Stop old core services without an equivalent in the new core.

2. Merge the new core's services with equivalents from the old core.

3. Reload all services with the merged core.

4. Start all services in the merged core.

Finally, we return the merged core. old-core and new-core can be discarded.
sourceraw docstring

update-indexclj

(update-index core event)

Updates this core's index with an event.

Updates this core's index with an event.
sourceraw docstring

wrap-indexclj

(wrap-index source)
(wrap-index source registry)

Wraps an index, exposing the normal Index and IFn protocols. If a second argument is present it should implement the PubSub interface and will be notified when events are updated in the index.

Wraps an index, exposing the normal Index and IFn protocols. If a second
argument is present it should implement the PubSub interface and will be
notified when events are updated in the index.
sourceraw docstring

WrappedIndexcljprotocol

sourceclj

(source this)
source

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

× close