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 the application checks its own against, and the notices its makers post.
The applications ask these whether or not anyone asked them to. The update server is asked whenever the health checks run once a build is two weeks old (UpdateCheck in the applications' source), and an answer that cannot be had ends the whole run of checks rather than the one, so a suite that cuts the application off from the internet has to answer it or lose every health check a fortnight after the release it pins. The clock is asked the same way (SystemTimeCheck), and an answer more than a day from the application's own is a health error, so a recording of it is wrong the day after it was made: this one answers with the time it is.
It is an http.Handler for whatever serves the hosts: the applications reach them over HTTPS, so a suite puts it behind the proxy the container is pointed at (test/replayproxy, Proxy.Serve), for the whole host or, where the host's other paths are replayed from a recording, for the one path.
It was written for prowlarr-mcp's suite.
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) Report ¶
Report says what a run should fail on at its end, "" for nothing: the requests there was no answer for, which are what an application has started asking that this does not know it asks. It reads as the replay proxy's report of its misses does.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP answers the three things the applications ask, under /v1: the newest release above the one asking (update/<branch>), the recent releases (update/<branch>/changes), the time (time) and the notices (notification), of which there are none.
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.