v1

package
v0.0.0-...-45c08f6 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FetchersWork []*FetcherWork

is like worker's heap

Functions

func AddFetcher

func AddFetcher(id uint, url string, interval uint)

Add fetcher as work

func DeleteFetcherWork

func DeleteFetcherWork(id uint)

Mark job as delete

func EditFetcher

func EditFetcher(id uint, url string, interval uint)

Edit fetcher as work

func StartWorker

func StartWorker(g handlers.Gwp)

Start workers when app run @todo change this function as Singleton and secure against restarting @see sync.Once

Types

type FetcherWork

type FetcherWork struct {
	Id       uint
	Url      string
	Interval uint
	Delete   bool
}

type GWP

type GWP struct {
	handlers.Gwp
}

func (GWP) DeleteFetcher

func (g GWP) DeleteFetcher(c echo.Context, id *int)

func (GWP) GetFetchers

func (g GWP) GetFetchers(c echo.Context) ([]*renderings.Fetchers, error)

func (GWP) GetHistory

func (g GWP) GetHistory(c echo.Context, id *int) (*renderings.History, error)

func (GWP) SaveFetcher

func (g GWP) SaveFetcher(c echo.Context, fetcher *bindings.Fetcher) (id uint, err error)

Jump to

Keyboard shortcuts

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