riemann.plugin

Simple plugin loader for riemann.

Riemann already offers the ability to load jar files in the classpath through its initialization scripts. This namespace allows walking the classpath, looking for small meta files distributed with plugins which hint at the requires.

This allows load-plugins or load-plugin to make new functions and streams available in the config file without resorting to manual requires.

The meta file distributed with plugins is expected to be an EDN file containing at least two keys:

  • plugin: the plugin name
  • require: the namespace to load

The namespace will be made available using the plugin name’s symbol value.

load-from-meta

(load-from-meta {:keys [plugin require]} {:keys [alias]})

Given a metadata description map, require plugin’s namespace

load-from-resource

(load-from-resource src options)

Given a path to a java resource, load metadata and require plugin

load-plugin

(load-plugin plugin)(load-plugin plugin options)

Given a plugin name, look for its metadata description file, and require plugin’s namespace. Optionally accepts an option map containing the :alias keyword which determines whether to create named aliases for the loaded plugin

load-plugins

(load-plugins options)(load-plugins)

Walk classpath and try to load all plugins that were found. Optionally accepts an option map containing the :alias keyword which determines whether to create named aliases for loaded plugins

read-safely

(read-safely src)

Read data without evaluation

repo

Default location of local maven repository