GoodAnalytics.Connectors.Dispatches (GoodAnalytics v0.1.1)

Copy Markdown View Source

Context for connector dispatch record operations.

Provides CRUD and query functions for durable outbound connector dispatch records used by the delivery, replay, and reconciliation flows.

Summary

Functions

Creates a new dispatch record.

Creates multiple dispatch records in a single transaction.

Finds connector-eligible events in a time window that are missing dispatches for the given connector type. Used by the reconciliation flow.

Finds connector-eligible built-in events and mapped custom events missing dispatches.

Gets a dispatch by connector type and connector event ID.

Gets a dispatch by ID.

Checks if a workspace+connector_type has credential errors.

Lists dispatches for a source event.

Lists dispatches for a workspace and connector type.

Lists pending/retryable dispatches for a connector type.

Updates a dispatch with delivery result metadata.

Functions

create_dispatch(attrs)

Creates a new dispatch record.

create_dispatches(dispatches_attrs)

Creates multiple dispatch records in a single transaction.

find_missing_dispatches(connector_type, workspace_id, since, event_types)

Finds connector-eligible events in a time window that are missing dispatches for the given connector type. Used by the reconciliation flow.

find_missing_dispatches(connector_type, workspace_id, since, event_types, mapped_event_names)

Finds connector-eligible built-in events and mapped custom events missing dispatches.

get_by_connector_event_id(connector_type, connector_event_id)

Gets a dispatch by connector type and connector event ID.

get_dispatch(id)

Gets a dispatch by ID.

has_credential_errors?(workspace_id, connector_type)

Checks if a workspace+connector_type has credential errors.

list_by_event(event_id)

Lists dispatches for a source event.

list_by_workspace(workspace_id, connector_type, opts \\ [])

Lists dispatches for a workspace and connector type.

list_pending(connector_type, opts \\ [])

Lists pending/retryable dispatches for a connector type.

update_delivery(dispatch, attrs)

Updates a dispatch with delivery result metadata.