Telegraf.Transport behaviour (Telegraf v0.1.0) View Source

Defines a transport for Telegraf.

A transport implements a method to communicate with the telegraf daemon, sending already serialized messages.

Link to this section Summary

Callbacks

Returns a list of children to be started by the Telegraf supervisor.

Sends a message to the telegraf daemon.

Link to this section Callbacks

Specs

children(name :: Telegraf.name(), opts :: Keyword.t()) :: [
  Supervisor.child_spec()
]

Returns a list of children to be started by the Telegraf supervisor.

Use it to start any processes necessary to the transport of the messages. Ex: Pool of connections with the daemon.

Link to this callback

send(name, message, opts)

View Source

Specs

send(name :: Telegraf.name(), message :: binary(), opts :: Keyword.t()) ::
  :ok | {:error, term()}

Sends a message to the telegraf daemon.