job

package
v0.0.0-...-9da61a2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2019 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container interface {
	Jobs() []Job
}

Container constitutes a set of jobs that the application will execute

func DefaultContainer

func DefaultContainer(storage storage.Storage, client *github.Client, config SlackConfig) Container

DefaultContainer creates an instance of the default job container

type IdlersReminder

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

IdlersReminder is a regular job which sends a notification to all users who have not reviewed assigned pull requests

func NewIdlersReminder

func NewIdlersReminder(storage storage.Storage, config SlackConfig) *IdlersReminder

NewIdlersReminder creates an instance of IdlersReminder

func (*IdlersReminder) Name

func (ir *IdlersReminder) Name() string

Name returns the name of the IdlersReminder job

func (*IdlersReminder) Period

func (ir *IdlersReminder) Period() string

Period returns the period of time when the IdlersReminder job should execute

func (*IdlersReminder) Run

func (ir *IdlersReminder) Run()

Run executes the IdlersReminder job

type Job

type Job interface {
	cron.Job
	Period() string
	Name() string
}

Job defines a task that will be executed periodically

type PullRequestFetcher

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

PullRequestFetcher is a regular job which fetches the pull requests for all registered projects

func NewPullRequestFetcher

func NewPullRequestFetcher(storage storage.Storage, client *github.Client) *PullRequestFetcher

NewPullRequestFetcher creates an instance of PullRequestFetcher

func (*PullRequestFetcher) Name

func (prf *PullRequestFetcher) Name() string

Name returns the name of the PullRequestFetcher job

func (*PullRequestFetcher) Period

func (prf *PullRequestFetcher) Period() string

Period returns the period of time when the PullRequestFetcher job should execute

func (*PullRequestFetcher) Run

func (prf *PullRequestFetcher) Run()

Run executes the PullRequestFetcher job

type ReviewFetcher

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

ReviewFetcher is a regular job which fetches reviews for tracked pull requests

func NewReviewFetcher

func NewReviewFetcher(storage storage.Storage, client *github.Client) *ReviewFetcher

NewReviewFetcher creates an instance of ReviewFetcheer

func (*ReviewFetcher) Name

func (rf *ReviewFetcher) Name() string

Name returns the name of the ReviewFetcher job

func (*ReviewFetcher) Period

func (rf *ReviewFetcher) Period() string

Period returns the period of time when the ReviewFetcher job should execute

func (*ReviewFetcher) Run

func (rf *ReviewFetcher) Run()

Run executes the ReviewFetcher job

type SlackConfig

type SlackConfig struct {
	ChannelID string
	BotToken  string
}

Jump to

Keyboard shortcuts

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