Documentation ¶
Overview ¶
Package queue implements our email queue. Accepted envelopes get put in the queue, and processed asynchronously.
Package queue is a generated protocol buffer package.
It is generated from these files:
queue.proto
It has these top-level messages:
Message Recipient
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Recipient_Status_name = map[int32]string{
0: "PENDING",
1: "SENT",
2: "FAILED",
}
View Source
var Recipient_Status_value = map[string]int32{
"PENDING": 0,
"SENT": 1,
"FAILED": 2,
}
View Source
var Recipient_Type_name = map[int32]string{
0: "EMAIL",
1: "PIPE",
}
View Source
var Recipient_Type_value = map[string]int32{
"EMAIL": 0,
"PIPE": 1,
}
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { // Base the item on the protobuf message. // We will use this for serialization, so any fields below are NOT // serialized. Message // Protect the entire item. sync.Mutex // Go-friendly version of Message.CreatedAtTs. CreatedAt time.Time }
An Item in the queue.
func ItemFromFile ¶
ItemFromFile loads an item from the given file.
type Message ¶
type Message struct { // Message ID. Uniquely identifies this message, it is used for // auditing and troubleshooting. ID string `protobuf:"bytes,1,opt,name=ID,json=iD" json:"ID,omitempty"` // The envelope for this message. From string `protobuf:"bytes,2,opt,name=from" json:"from,omitempty"` To []string `protobuf:"bytes,3,rep,name=To,json=to" json:"To,omitempty"` Rcpt []*Recipient `protobuf:"bytes,4,rep,name=rcpt" json:"rcpt,omitempty"` Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // Creation timestamp. CreatedAtTs *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=created_at_ts,json=createdAtTs" json:"created_at_ts,omitempty"` }
func (*Message) Descriptor ¶
func (*Message) GetCreatedAtTs ¶
func (m *Message) GetCreatedAtTs() *google_protobuf.Timestamp
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue that keeps mail waiting for delivery.
func New ¶
func New(path string, localDomains *set.String, aliases *aliases.Resolver, localC, remoteC courier.Courier) *Queue
New creates a new Queue instance.
func (*Queue) DumpString ¶
DumpString returns a human-readable string with the current queue. Useful for debugging purposes.
type Recipient ¶
type Recipient struct { // Address to send the message to. // This is the final one, after expanding aliases. Address string `protobuf:"bytes,1,opt,name=address" json:"address,omitempty"` Type Recipient_Type `protobuf:"varint,2,opt,name=type,enum=queue.Recipient_Type" json:"type,omitempty"` Status Recipient_Status `protobuf:"varint,3,opt,name=status,enum=queue.Recipient_Status" json:"status,omitempty"` LastFailureMessage string `protobuf:"bytes,4,opt,name=last_failure_message,json=lastFailureMessage" json:"last_failure_message,omitempty"` // Address that this recipient was originally intended to. // This is before expanding aliases and only used in very particular // cases. OriginalAddress string `protobuf:"bytes,5,opt,name=original_address,json=originalAddress" json:"original_address,omitempty"` }
func (*Recipient) Descriptor ¶
func (*Recipient) ProtoMessage ¶
func (*Recipient) ProtoMessage()
type Recipient_Status ¶
type Recipient_Status int32
const ( Recipient_PENDING Recipient_Status = 0 Recipient_SENT Recipient_Status = 1 Recipient_FAILED Recipient_Status = 2 )
func (Recipient_Status) EnumDescriptor ¶
func (Recipient_Status) EnumDescriptor() ([]byte, []int)
func (Recipient_Status) String ¶
func (x Recipient_Status) String() string
type Recipient_Type ¶
type Recipient_Type int32
const ( Recipient_EMAIL Recipient_Type = 0 Recipient_PIPE Recipient_Type = 1 )
func (Recipient_Type) EnumDescriptor ¶
func (Recipient_Type) EnumDescriptor() ([]byte, []int)
func (Recipient_Type) String ¶
func (x Recipient_Type) String() string
Click to show internal directories.
Click to hide internal directories.