scanner

package
v0.0.0-...-8fb32ab Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel chan *reddit.Post

Channel is a reddit post channel

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is a reddit bot

func New

func New(version string) (*Handler, error)

New creates a new scanner to look for Reddit posts in /r/mechmarket

func (*Handler) Post

func (r *Handler) Post(p *reddit.Post) error

Post receives an update from Reddit and forwards it to the Channel

func (*Handler) Start

func (r *Handler) Start() (chan *reddit.Post, error)

Start will start the scanner and return a channel to listen for new posts

type Interface

type Interface interface {
	Post(*reddit.Post) error
	Start() (chan *reddit.Post, error)
}

Interface is the stats public functions

Jump to

Keyboard shortcuts

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