js

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDomainNotFound = errors.New("domain not found")

Functions

This section is empty.

Types

type File

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

func Compile

func Compile(ctx context.Context, dir string) (*File, error)

func (*File) Schedule

func (s *File) Schedule(dur string, cb goja.Callable)

func (*File) Units

func (f *File) Units() (o []Runnable)

type Runnable

type Runnable interface {
	Interval() time.Duration
	Run()
}

type Scheduler

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

func NewScheduler

func NewScheduler() *Scheduler

func (*Scheduler) Add

func (s *Scheduler) Add(r Runnable)

func (*Scheduler) Close

func (s *Scheduler) Close() error

func (*Scheduler) Run

func (s *Scheduler) Run(ctx context.Context)

type Unit

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

func (*Unit) Interval

func (u *Unit) Interval() time.Duration

func (*Unit) Run

func (u *Unit) Run()

type UnitList

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

func (*UnitList) Interval

func (u *UnitList) Interval() time.Duration

func (*UnitList) Run

func (u *UnitList) Run()

Jump to

Keyboard shortcuts

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