domain

package
v0.0.0-...-04005c2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinimumTaskFrequency = time.Duration(1 * time.Minute)
)
View Source
const (
	NoOpTaskType = "no-op"
)
View Source
const (
	TravisTaskType = "travis-re-run"
)
View Source
const (
	URLGetTaskType = "url-get"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTask

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

func (BaseTask) EntryID

func (t BaseTask) EntryID() cron.EntryID

func (BaseTask) ID

func (t BaseTask) ID() uint

func (BaseTask) Schedule

func (t BaseTask) Schedule() string

func (*BaseTask) SetEntryID

func (t *BaseTask) SetEntryID(entryID cron.EntryID)

func (*BaseTask) SetID

func (t *BaseTask) SetID(id uint) error

func (*BaseTask) SetSchedule

func (t *BaseTask) SetSchedule(schedule string)

type BaseTaskJson

type BaseTaskJson struct {
	ID       uint         `json:"id"`
	Schedule string       `json:"schedule"`
	EntryID  cron.EntryID `json:"entryID"`
	Type     string       `json:"type"`
}

type NoOpTask

type NoOpTask struct {
	BaseTask
	// contains filtered or unexported fields
}

func NewNoOpTask

func NewNoOpTask(schedule string, sleepDuration time.Duration, logger lager.Logger) *NoOpTask

func (NoOpTask) AsJSON

func (t NoOpTask) AsJSON() TaskJSON

func (NoOpTask) Run

func (t NoOpTask) Run()

type NoOpTaskJSON

type NoOpTaskJSON struct {
	BaseTaskJson
	SleepDuration string `json:"sleepDuration"`
}

type Task

type Task interface {
	ID() uint
	SetID(id uint) error

	Schedule() string
	SetSchedule(schedule string)

	EntryID() cron.EntryID
	SetEntryID(id cron.EntryID)

	Run()

	AsJSON() TaskJSON
}

type TaskJSON

type TaskJSON interface{}

type TravisTask

type TravisTask struct {
	BaseTask
	// contains filtered or unexported fields
}

func NewTravisTask

func NewTravisTask(schedule, token string, buildID uint, logger lager.Logger) *TravisTask

func (TravisTask) AsJSON

func (t TravisTask) AsJSON() TaskJSON

func (TravisTask) Run

func (t TravisTask) Run()

type TravisTaskJSON

type TravisTaskJSON struct {
	BaseTaskJson
	BuildID uint `json:"buildID"`
}

type URLGetTask

type URLGetTask struct {
	BaseTask
	// contains filtered or unexported fields
}

func NewURLGetTask

func NewURLGetTask(schedule, url string, logger lager.Logger) *URLGetTask

func (URLGetTask) AsJSON

func (t URLGetTask) AsJSON() TaskJSON

func (URLGetTask) Run

func (t URLGetTask) Run()

type URLGetTaskJSON

type URLGetTaskJSON struct {
	BaseTaskJson
	URL string `json:"url"`
}

Jump to

Keyboard shortcuts

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