restaskhost

package
v0.0.0-...-a8d303e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Keywords = []keywords.Keyword{
		{
			Option:        "schedule",
			DefaultOption: "run_schedule",
			Attr:          "Schedule",
			Scopable:      true,
			Text:          keywords.NewText(fs, "text/kw/schedule"),
			Example:       "00:00-01:00 mon",
		},
		{
			Option:    "timeout",
			Attr:      "Timeout",
			Converter: converters.Duration,
			Scopable:  true,
			Text:      keywords.NewText(fs, "text/kw/timeout"),
			Example:   "5m",
		},
		{
			Option:    "snooze",
			Attr:      "Snooze",
			Converter: converters.Duration,
			Scopable:  true,
			Example:   "10m",
			Text:      keywords.NewText(fs, "text/kw/snooze"),
		},
		{
			Option:    "log",
			Attr:      "LogOutputs",
			Converter: converters.Bool,
			Text:      keywords.NewText(fs, "text/kw/log"),
		},
		{
			Option:   "command",
			Attr:     "RunCmd",
			Scopable: true,
			Text:     keywords.NewText(fs, "text/kw/command"),
		},
		{
			Option:   "on_error",
			Attr:     "OnErrorCmd",
			Scopable: true,
			Example:  "/srv/{name}/data/scripts/task_on_error.sh",
			Text:     keywords.NewText(fs, "text/kw/on_error"),
		},
		{
			Option:     "check",
			Attr:       "Check",
			Candidates: []string{"last_run", ""},
			Scopable:   true,
			Example:    "last_run",
			Text:       keywords.NewText(fs, "text/kw/check"),
		},
		{
			Option:    "confirmation",
			Attr:      "Confirmation",
			Converter: converters.Bool,
			Text:      keywords.NewText(fs, "text/kw/confirmation"),
		},
	}
)

Functions

func New

func New() resource.Driver

Types

type T

type T struct {
	resapp.T
	RunCmd       string
	OnErrorCmd   string
	Check        string
	Schedule     string
	Confirmation bool
	LogOutputs   bool
	Snooze       *time.Duration
}

T is the driver structure.

func (T) IsRunning

func (t T) IsRunning() bool

func (*T) Kill

func (t *T) Kill(ctx context.Context) error

func (T) Label

func (t T) Label() string

Label returns a formatted short description of the Resource

func (T) Manifest

func (t T) Manifest() *manifest.T

Manifest ...

func (T) Run

func (t T) Run(ctx context.Context) error

func (T) ScheduleOptions

func (t T) ScheduleOptions() resource.ScheduleOptions

func (*T) Status

func (t *T) Status(ctx context.Context) status.T

Jump to

Keyboard shortcuts

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