Instream v1.0.0 Instream.Writer behaviour View Source

Point writer behaviour.

Link to this section Summary

Callbacks

Called during worker initialization.

Called during worker termination.

Link to this section Types

Specs

worker_state() :: %{:module => module(), optional(term()) => term()}

Link to this section Callbacks

Link to this callback

init_worker(worker_state)

View Source (optional)

Specs

init_worker(worker_state()) :: worker_state()

Called during worker initialization.

This will be called for every process in the worker pool individually.

Link to this callback

terminate_worker(worker_state)

View Source (optional)

Specs

terminate_worker(worker_state()) :: :ok

Called during worker termination.

This will be called for every process in the worker pool individually.

Link to this callback

write(payload, opts, worker_state)

View Source

Specs

write(payload :: Instream.Query.t(), opts :: Keyword.t(), worker_state()) ::
  Instream.Response.t()

Writes a point.