messagegetter

package
v0.0.0-...-4809f3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2016 License: GPL-2.0 Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL