js

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: AGPL-3.0 Imports: 18 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 Alert added in v0.0.15

type Alert struct {
	Name     string
	Path     string
	Interval time.Duration
	VM       *goja.Runtime
	JS       []byte
	Function goja.Callable
}

func Compile

func Compile(ctx context.Context, paths ...string) ([]*Alert, error)

func CompileWith added in v0.0.15

func CompileWith(ctx context.Context, dir string, paths ...string) ([]*Alert, error)

func (*Alert) Run added in v0.0.15

func (a *Alert) Run(ctx context.Context)

type Scheduler

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

func NewScheduler

func NewScheduler() *Scheduler

func (*Scheduler) Add

func (s *Scheduler) Add(a *Alert)

func (*Scheduler) Close

func (s *Scheduler) Close() error

func (*Scheduler) Run

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

Jump to

Keyboard shortcuts

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