View Source OffBroadway.Defender365.Client behaviour (off_broadway_defender365 v1.0.0)

A generic behaviour for implementing 365 Defender API clients for OffBroadway.Defender365.Producer.

This module defines callbacks to normalize options and receive events for Microsoft 365 Defender REST APIs.

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

Link to this section Summary

Link to this section Types

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

Link to this section Callbacks

Link to this callback

ack_message(message, ack_options)

View Source (optional)
@callback ack_message(message :: Broadway.Message.t(), ack_options :: any()) :: any()
@callback init(opts :: any()) ::
  {:ok, normalized_opts :: any()} | {:error, reason :: binary()}
Link to this callback

receive_messages(demand, opts)

View Source
@callback receive_messages(demand :: pos_integer(), opts :: any()) :: messages()