script

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultCronValue represents Default Cron Value
	DefaultCronValue = "0 * * * * *"
	// DefaultTimeout is the default timeout
	DefaultTimeout = time.Hour
)

Variables

View Source
var (
	// CronParser is default cron parser
	CronParser = cron.NewParser(cron.Second | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
)

Functions

This section is empty.

Types

type Script

type Script struct {
	Name       string
	Body       []byte
	CronValue  string
	Timeout    time.Duration
	Ignore     bool
	Channels   []string
	IsTest     bool
	TestTarget string
}

Script represents the Script

func New added in v0.1.0

func New() *Script

New creates new Script

func (*Script) Hash

func (s *Script) Hash() string

Hash returns the hash, based on script name and body

func (*Script) ParseMeta

func (s *Script) ParseMeta() error

ParseMeta parse script meta

Jump to

Keyboard shortcuts

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