Documentation ¶
Overview ¶
Package client provides the low level assembly of the Notifiarr client application. This package orchestrates reading in of configuration, parsing cli flags, actioning those cli flags, setting up logging, and finally the starting of internal service routines for the webserver, plex sessions, snapshots, service checks and others. This package sets everything up for the client application.
Index ¶
Constants ¶
const ( Title = "Notifiarr" DefaultName = "notifiarr" DefaultLogFileMb = 100 DefaultLogFiles = 0 // delete none DefaultEnvPrefix = "DN" )
Application Defaults.
Variables ¶
var (
ErrNilAPIKey = fmt.Errorf("API key may not be empty: set a key in config file or with environment variable")
)
Errors returned by this package.
var ErrNoServer = fmt.Errorf("the web server is not running, cannot stop it")
ErrNoServer returns when the server is already stopped and a stop req occurs.
Functions ¶
Types ¶
type Client ¶
type Client struct { *logs.Logger Flags *Flags Config *configfile.Config // contains filtered or unexported fields }
Client stores all the running data.
func NewDefaults ¶
func NewDefaults() *Client
NewDefaults returns a new Client pointer with default settings.
func (*Client) AutoWatchUpdate ¶
func (c *Client) AutoWatchUpdate()
AutoWatchUpdate is not used on this OS.
func (*Client) PrintStartupInfo ¶
func (c *Client) PrintStartupInfo()
PrintStartupInfo prints info about our startup config. This runs once on startup, and again during reloads.
func (*Client) StartWebServer ¶
func (c *Client) StartWebServer()
StartWebServer starts the web server.
func (*Client) StopWebServer ¶
StopWebServer stops the web servers. Panics if that causes an error or timeout.