func (c *Config) Start() {
	if c.Trigger.stop != nil {
		panic("notifiarr timers cannot run twice")
	}
	c.Trigger.stuck = &action{
		Fn:  c.sendStuckQueueItems,
		Msg: "Checking app queues and sending stuck items.",
		C:   make(chan EventType, 1),
		T:   time.NewTicker(stuckDur),
	}
	c.Trigger.plex = &action{
		Fn:  c.sendPlexSessions,
		Msg: "Gathering and sending Plex Sessions.",
		C:   make(chan EventType, 1),
	}
	c.Trigger.gaps = &action{
		Fn:  c.sendGaps,
		Msg: "Sending Radarr Collection Gaps.",
		C:   make(chan EventType, 1),
	}
	c.Trigger.sync = &action{
		Fn:  c.syncCF,
		Msg: "Starting Custom Formats and Quality Profiles Sync for Radarr and Sonarr.",
		C:   make(chan EventType, 1),
	}
	c.Trigger.dash = &action{
		Fn:  c.sendDashboardState,
		Msg: "Initiating State Collection for Dashboard.",
		C:   make(chan EventType, 1),
	}
	c.Trigger.snap = &action{
		Fn:  c.sendSnapshot,
		Msg: "Gathering and sending System Snapshot.",
		C:   make(chan EventType, 1),
	}
	c.Trigger.stop = &action{
		Msg: "Stop Channel is used for reloads and must not have a function.",
		C:   make(chan EventType),
	}
	c.Trigger.sess = make(chan time.Time, 1)
	c.extras.radarrCF = make(map[int]*cfMapIDpayload)
	c.extras.sonarrRP = make(map[int]*cfMapIDpayload)
	c.extras.plexTimer = &Timer{}
	go c.runSessionHolder()
	c.startTimers()
}
Start runs the timers.
package notifiarr
import (
	"fmt"
	"net/http"
	"os"
	"strings"
	"sync"
	"time"
	"github.com/Notifiarr/notifiarr/pkg/apps"
	"github.com/Notifiarr/notifiarr/pkg/logs"
	"github.com/Notifiarr/notifiarr/pkg/plex"
	"github.com/Notifiarr/notifiarr/pkg/snapshot"
	"github.com/shirou/gopsutil/v3/host"
)
var (
	ErrNon200          = fmt.Errorf("return code was not 200")
	ErrInvalidResponse = fmt.Errorf("invalid response")
)
type Route string
const (
	BaseURL           = "https://notifiarr.com"
	DevBaseURL        = "https://dev.notifiarr.com"
	userRoute1  Route = "/api/v1/user"
	userRoute2  Route = "/api/v2/user"
	ClientRoute Route = userRoute2 + "/client"
	CFSyncRoute Route = userRoute1 + "/trash"
	GapsRoute   Route = userRoute1 + "/gaps"
	notifiRoute Route = "/api/v1/notification"
	DashRoute   Route = notifiRoute + "/dashboard"
	StuckRoute  Route = notifiRoute + "/stuck"
	PlexRoute   Route = notifiRoute + "/plex"
	SnapRoute   Route = notifiRoute + "/snapshot"
	SvcRoute    Route = notifiRoute + "/services"
)
const (
	ModeDev  = "development"
	ModeProd = "production"
)
type EventType string
const (
	EventCron    EventType = "cron"
	EventUser    EventType = "user"
	EventAPI     EventType = "api"
	EventHook    EventType = "webhook"
	EventStart   EventType = "start"
	EventMovie   EventType = "movie"
	EventEpisode EventType = "episode"
	EventPoll    EventType = "poll"
	EventReload  EventType = "reload"
)
func (r Route) Path(event EventType, params ...string) string {
	switch {
	case len(params) == 0 && event == "":
		return string(r)
	case len(params) == 0:
		return string(r) + "?event=" + string(event)
	case event == "":
		return string(r) + "?" + strings.Join(params, "&")
	default:
		return string(r) + "?" + strings.Join(append(params, "event="+string(event)), "&")
	}
}
const (
	DefaultRetries = 4
	RetryDelay = 222 * time.Millisecond
)
const success = "success"
type Payload struct {
	Plex *plex.Sessions       `json:"plex,omitempty"`
	Snap *snapshot.Snapshot   `json:"snapshot,omitempty"`
	Load *plexIncomingWebhook `json:"payload,omitempty"`
}
type Config struct {
	Apps     *apps.Apps        
	Plex     *plex.Server      
	Snap     *snapshot.Config  
	Services *ServiceConfig
	Retries  int
	BaseURL  string
	Timeout  time.Duration
	Trigger  Triggers
	MaxBody  int
	Sighup   chan os.Signal
	*logs.Logger  
	extras
}
type extras struct {
	ciMutex sync.Mutex
	*ClientInfo
	client    *httpClient
	radarrCF  map[int]*cfMapIDpayload
	sonarrRP  map[int]*cfMapIDpayload
	plexTimer *Timer
	hostInfo  *host.InfoStat
}
type Triggers struct {
	stop  *action         
	sync  *action         
	gaps  *action         
	stuck *action         
	plex  *action         
	dash  *action         
	snap  *action         
	sess  chan time.Time  
	sessr chan *holder    
}
func (c *Config) Setup(mode string) string {
	switch strings.ToLower(mode) {
	default:
		c.BaseURL = BaseURL
	case "prod", ModeProd:
		c.BaseURL = BaseURL
		mode = ModeProd
	case "dev", "devel", ModeDev, "test", "testing":
		c.BaseURL = DevBaseURL
		mode = ModeDev
	}
	if c.Retries < 0 {
		c.Retries = 0
	} else if c.Retries == 0 {
		c.Retries = DefaultRetries
	}
	if c.extras.client == nil {
		c.extras.client = &httpClient{
			Retries: c.Retries,
			Logger:  c.ErrorLog,
			Client:  &http.Client{},
		}
	}
	return mode
}