idle

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package idle tells when a stack was last requested through the proxy, from the proxy's access log: one JSON line per request with only the router and the time (phase 4 design D3, D4).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LastRequests

func LastRequests(lines []string, projects []string) map[string]time.Time

LastRequests returns the latest request per project in the proxy's log lines. A router belongs to the longest project name it starts with, followed by "-": router names are <project>-<service>, so shop-main-x-web belongs to shop-main-x, not to shop-main. Lines that are not access log lines, such as Traefik's own, are skipped.

func Recording

func Recording(cmd []string) bool

Recording reports whether a proxy with this command records its requests; a proxy of siding v0.3 does not.

func Since

func Since(request, stackStart, proxyStart time.Time) time.Time

Since is the time a stack counts as last requested: its latest request, or the later start of the stack or the proxy when that is later, because the proxy's record begins when it starts and a new stack has not had its chance yet (spec idle-stop).

Types

This section is empty.

Jump to

Keyboard shortcuts

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