Documentation ¶
Overview ¶
Package messagegetter provides an async API for fetching a whole bunch of gmail messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageGetter ¶
type MessageGetter struct {
// contains filtered or unexported fields
}
MessageGetter provides an async interface to fetch gmail messages.
func New ¶
func New(g *gmail.Service, email string, profileAPI func(op string, d time.Duration), backoff func(n int) (time.Duration, bool)) *MessageGetter
New creates a new MessageGetter.
func (*MessageGetter) Add ¶
func (m *MessageGetter) Add(id string)
Add adds a new message ID to be retrieved.
func (*MessageGetter) Done ¶
func (m *MessageGetter) Done()
Done tells MessageGetter that no more messages will be asked for.
func (*MessageGetter) Get ¶
func (m *MessageGetter) Get() <-chan *gmail.Message
Get returns a channel where all messages will be sent.
Click to show internal directories.
Click to hide internal directories.