Karta. Messaging. Connector
(Karta v1.0.0)
One configured instance of a plug on a server (Karta.Messaging.Plug):
"Postduif, Winkel Kralendijk", "Bird SMS, +599 777 1234".
status is what Karta knows now: new (made, nobody enrolled yet),
enrolled (enrolled, never connected), connected, offline (the
agent is not connected), needs_link (connected, but the account is
not linked to WhatsApp), needs_update (the agent is too old, or the
protocol moved on), error (see last_error), disabled, revoked
(the agent's key is no longer accepted).
A remote plug's connector keeps the agent's public key (public_key, 32
raw bytes), the SHA-256 of the one-time enrolment token while the token
is valid, the agent's cursors (acked_event_seq: events committed;
last_command_seq: the last command seq assigned), and which replica
holds the agent's connection (session_id, session_node,
session_seen_at). secrets is encrypted JSON (an SMS provider's API
key), never shown after it is stored.
Summary
Functions
The channels connectors serve.
What input may set when a connector is made: its name, its limits and its plug's configuration.
The statuses a connector can have.
What input may change later: the name and the limits.
Types
@type t() :: %Karta.Messaging.Connector{ __meta__: term(), accounts: term(), acked_event_seq: term(), agent: term(), agent_version: term(), capabilities: term(), channel: term(), config: term(), cost_model: term(), enrolment_expires_at: term(), enrolment_token_hash: term(), id: term(), inserted_at: term(), journal_id: term(), key_fingerprint: term(), last_command_seq: term(), last_error: term(), last_seen_at: term(), limits: term(), name: term(), plug: term(), public_key: term(), revoked_at: term(), secrets: term(), server: term(), server_id: term(), session_id: term(), session_node: term(), session_seen_at: term(), status: term(), updated_at: term() }
Functions
The channels connectors serve.
What input may set when a connector is made: its name, its limits and its plug's configuration.
The statuses a connector can have.
What input may change later: the name and the limits.