Documentation
¶
Overview ¶
Package events records what happens (mail received, subscriptions, sends, bounces, opens, clicks) and streams it live to `lfr events --follow`.
Index ¶
Constants ¶
View Source
const ( Received = "received" // a message arrived in a mailbox Subscribed = "subscribed" // a signup is pending confirmation Confirmed = "confirmed" // a membership was confirmed Unsubscribed = "unsubscribed" // a member left a list Sent = "sent" // an outbound message was handed over Failed = "failed" // an outbound message failed for good Deferred = "deferred" // an outbound attempt failed temporarily Bounced = "bounced" // a recipient address does not exist Complained = "complained" // a recipient marked a message as spam Opened = "opened" Clicked = "clicked" IssueStarted = "issue_started" IssueFinished = "issue_finished" Paused = "paused" // a list stopped sending, see detail )
Kinds of events.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bus ¶
Bus stores events and fans them out to subscribers.
func (*Bus) Publish ¶
Publish sends e to every subscriber that keeps up; slow ones miss events rather than stalling the server.
type Event ¶
type Event struct {
ID int64 `json:"id"`
At time.Time `json:"at"`
Kind string `json:"kind"`
ListID int64 `json:"list_id,omitempty"`
IssueID int64 `json:"issue_id,omitempty"`
ContactID int64 `json:"contact_id,omitempty"`
OutboundID int64 `json:"outbound_id,omitempty"`
MessageID int64 `json:"message_id,omitempty"`
Detail string `json:"detail,omitempty"`
}
Event is one record.
Click to show internal directories.
Click to hide internal directories.