arrserver

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package arrserver is the servers a Prowlarr, Sonarr or Radarr calls home to, for a live suite to answer itself: the update server, the clock, and the notices.

The applications ask these unasked. An update check that cannot be answered ends every health check once a build is two weeks old, so a suite that cuts the application off must answer it; the clock is checked the same way, and a recording of it is wrong by the next day, so this answers the time it is. It is a handler for a suite to put behind its proxy (replayproxy.Proxy.Serve), for the whole host or for one path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is the servers, as one handler. The zero value is not usable; make one with New.

func New

func New() *Server

New is a server that knows of no release, so no update is ever on offer.

func (*Server) Offer

func (s *Server) Offer(updates ...Update)

Offer sets the releases the update server knows of, replacing any it knew.

func (*Server) Report

func (s *Server) Report() string

Report says what a run should fail on, "" for nothing: the requests with no answer, worded like the replay proxy's report of its misses.

func (*Server) Requests

func (s *Server) Requests() []string

Requests is every request received, in order, as a method and a path.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP answers, under /v1: the newest release above the one asking (update/<branch>), the recent releases (update/<branch>/changes), the time, and the notices, of which there are none.

func (*Server) SetDown

func (s *Server) SetDown(down bool)

SetDown makes every answer a 503, the way the services answer when they are not there, or puts them back.

func (*Server) Unknown

func (s *Server) Unknown() []string

Unknown is the requests answered 404: what an application asks that this does not know of.

type Update

type Update struct {
	// Version is the release, e.g. "2.7.0.5700".
	Version string
	// Released is when; zero is a day before the server started.
	Released time.Time
	// New and Fixed are its changes, as the release notes list them.
	New   []string
	Fixed []string
}

Update is one release the update server knows of.

Jump to

Keyboard shortcuts

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