core

package
v2.6.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GithubProviderName    = "github"
	CgitProviderName      = "cgit"
	BitbucketProviderName = "bitbucket"
)

Variables

View Source
var (
	Config *config = &config{}
)
View Source
var (
	NoErrStopProvider = errors.New("this provider will not return more mentions")
)

Functions

func CreateBitbucketTable

func CreateBitbucketTable(DB *sql.DB) error

TODO temporal method to create bitbucket table

func CreateCgitTables

func CreateCgitTables(DB *sql.DB) error

TODO temporal method to create cgit tables

func CreateGithubTable

func CreateGithubTable(DB *sql.DB) error

TODO temporal method to create github table

func DropTables

func DropTables(DB *sql.DB, names ...string) error

Types

type PersistFN

type PersistFN func(*model.Mention) error

type RepoProvider

type RepoProvider interface {
	Next() (*model.Mention, error)
	Ack(error) error
	Close() error
	Name() string
}

type Watcher

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

func NewWatcher

func NewWatcher(providers []RepoProvider, persist PersistFN,
	timeToSleep time.Duration, timeToRetryAck time.Duration) *Watcher

func (*Watcher) Start

func (w *Watcher) Start()

Jump to

Keyboard shortcuts

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