crontimer

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package crontimer is used to kick off events on the website. Instead of run a cron on the website that polls every client, we run the cron on the client, so each of them polls the website. Crons are added here solely by the website in the startup payload.

Index

Constants

View Source
const (
	TrigPollSite common.TriggerName = "Polling Notifiarr for new settings."
	TrigUpCheck  common.TriggerName = "Telling Notifiarr website we are still up!"
)

TrigPollSite is our site polling trigger identifier.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

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

Action contains the exported methods for this package.

func New

func New(config *common.Config) *Action

New configures the library.

func (*Action) Create

func (a *Action) Create()

Create initializes the library.

func (*Action) List

func (a *Action) List() []*Timer

List returns a list of active triggers that can be executed.

func (*Action) Run added in v0.8.0

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

Run fires in a go routine. Wait a minute or two then tell the website we're up. If app reloads in first checkWait duration, this throws an error. That's ok.

func (*Action) Stop added in v0.8.0

func (a *Action) Stop()

Stop satisfies an interface.

type Timer

type Timer struct {
	*clientinfo.CronConfig
	// contains filtered or unexported fields
}

Timer is used to trigger actions.

func (*Timer) Run

func (t *Timer) Run(input *common.ActionInput)

Run fires a custom cron timer (GET).

Jump to

Keyboard shortcuts

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