triggers

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Pcakage triggers provides a simple interface to setup all sub-module triggers. Adding a new trigger here should be two new lines of code and a new import.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

type Actions struct {

	// Order is important here.
	PlexCron   *plexcron.Action
	Backups    *backups.Action
	CFSync     *cfsync.Action
	CronTimer  *crontimer.Action
	Dashboard  *dashboard.Action
	FileWatch  *filewatch.Action
	Gaps       *gaps.Action
	SnapCron   *snapcron.Action
	StuckItems *stuckitems.Action
	Commands   *commands.Action
	// contains filtered or unexported fields
}

Actions defines all our triggers and timers. Any action here will automatically have its interface methods called.

func New

func New(config *Config) *Actions

New turns a populated Config into a pile of Actions.

func (*Actions) Start

func (a *Actions) Start()

Start creates all the triggers and runs the timers.

func (*Actions) Stop

func (a *Actions) Stop(event website.EventType)

Stop all internal cron timers and Triggers.

type Config

type Config struct {
	Serial     bool
	Apps       *apps.Apps
	Plex       *plex.Server
	Website    *website.Server
	Snapshot   *snapshot.Config
	WatchFiles []*filewatch.WatchFile
	Commands   []*commands.Command
	mnd.Logger
}

Config is the required input data. Everything is mandatory.

Directories

Path Synopsis
package commands provides the interfaces and structures to trigger and run shell commands.
package commands provides the interfaces and structures to trigger and run shell commands.

Jump to

Keyboard shortcuts

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