OffBroadway.Splunk.Client behaviour (off_broadway_splunk v3.0.1)

Copy Markdown View Source

A generic behaviour for implementing Splunk clients for OffBroadway.Splunk.Producer.

This module defines callbacks to normalize options and receive items for a Splunk job.

Modules that implements this behaviour should be passed as the :splunk_client option from OffBroadway.Splunk.Producer.

Summary

Types

messages()

@type messages() :: [Broadway.Message.t()]

Callbacks

ack_message(message, ack_options)

(optional)
@callback ack_message(message :: Broadway.Message.t(), ack_options :: any()) :: any()

init(opts)

@callback init(opts :: any()) ::
  {:ok, normalized_opts :: any()} | {:error, reason :: binary()}

receive_messages(sid, demand, opts)

@callback receive_messages(sid :: binary(), demand :: pos_integer(), opts :: any()) ::
  {:ok, messages()} | {:error, reason :: any()}

receive_status(name, opts)

@callback receive_status(name :: binary(), opts :: any()) ::
  {:ok, response :: any()} | {:error, reason :: any()}