core

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyClosed = errors.New(`core already closed`)

Functions

This section is empty.

Types

type Core

type Core struct {
	*cron.Cron
	// contains filtered or unexported fields
}

Core core

func New

func New(opt ...CoreOption) (core *Core, e error)

New new Core

func (*Core) Add

func (c *Core) Add(spec string) (cron.EntryID, error)

Add add a job for crontab

func (*Core) GenerateDescription

func (c *Core) GenerateDescription() error

func (*Core) Serve

func (c *Core) Serve() (e error)

Serve Perform scheduled tasks

func (*Core) Stop

func (c *Core) Stop() (e error)

Stop Serve

func (*Core) UnsafeJob

func (c *Core) UnsafeJob() error

UnsafeJob .

type CoreOption

type CoreOption interface {
	// contains filtered or unexported methods
}

func WithAuth

func WithAuth(username, password string) CoreOption

func WithBackend

func WithBackend(backend backend.Backend) CoreOption

func WithDescription

func WithDescription(description bool) CoreOption

func WithImmediate

func WithImmediate(immediate bool) CoreOption

func WithOutput

func WithOutput(output string) CoreOption

func WithServer

func WithServer(host string, port uint16) CoreOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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