PolymarketNotify.Channel behaviour (PolymarketNotify v0.1.0)

Copy Markdown View Source

Behaviour for a delivery channel — deliver/2 ships a plain-text message somewhere and returns :ok or {:error, reason}. May raise; PolymarketNotify.notify/3 isolates callers from that.

Summary

Callbacks

Ship message (plain text) to this channel's destination using opts. Return :ok on success or {:error, reason}. May raise; PolymarketNotify.notify/3 isolates callers from failures.

Callbacks

deliver(message, opts)

@callback deliver(message :: String.t(), opts :: keyword()) :: :ok | {:error, term()}

Ship message (plain text) to this channel's destination using opts. Return :ok on success or {:error, reason}. May raise; PolymarketNotify.notify/3 isolates callers from failures.