Fact.EventDataIndexer (Fact v0.2.1)

View Source

Indexes events by the values of a specified field within event data.

Summary

Types

The id for a Fact.EventDataIndexer.

Custom option values passed to the Fact.EventIndexer.index_event/3 callback function.

Custom options passed to the Fact.EventIndexer.index_event/3 callback function.

Functions

Returns a specification to start this module under a supervisor.

Retrieves the value for the configured :indexer_key from the event's data payload.

Gets the friendly name for the indexer.

Starts the indexer process.

Types

id()

(since 0.1.0)
@type id() :: {Fact.EventDataIndexer, Fact.EventIndexer.indexer_key()}

The id for a Fact.EventDataIndexer.

option()

(since 0.1.0)
@type option() :: {:indexer_key, String.t()} | Fact.EventIndexer.indexer_option()

Custom option values passed to the Fact.EventIndexer.index_event/3 callback function.

options()

(since 0.1.0)
@type options() :: [option()]

Custom options passed to the Fact.EventIndexer.index_event/3 callback function.

Functions

child_spec(init_arg)

(since 0.1.0)

Returns a specification to start this module under a supervisor.

See Supervisor.

index_event(schema, event, opts)

(since 0.1.0)
@spec index_event(Fact.event_schema(), Fact.event_record(), options()) ::
  String.t() | nil

Retrieves the value for the configured :indexer_key from the event's data payload.

Options

  • :indexer_key — required, specified the field to lookup within the event data

indexer_name()

(since 0.1.2)
@spec indexer_name() :: String.t()

Gets the friendly name for the indexer.

This is included in the file path where index files are stored on disk.

start_link(opts \\ [])

(since 0.1.0)
@spec start_link([Fact.EventIndexer.option()]) :: GenServer.on_start()

Starts the indexer process.