Skip to main content

Module runlight

Module runlight 

Source
Expand description

The Runlight: sites, the tracker’s hits, short links, AI agent fetches, and the scheduled upkeep (runlight.ts).

Structs§

AppMailer
A mailer of the app’s own, such as a CMS’s, that sends each message itself.
Remote
Another Runlight install a site is read from: its address, its token there, and its own id for the site.
RemoteInfo
What a connected install last said about its site.
Runlight
Privacy friendly web analytics that lives inside your app. A cheap handle to clone.
RunlightOptions
How a Runlight is made.
SiteOptions
A site as code gives it.

Enums§

TrustProxy
Where the client’s address is read from.

Constants§

LINK_DOMAIN_CHECK
A path on every link domain that answers when the domain reaches this Runlight.
RETENTION_MONTHS
The choices for how long a site keeps its visits.
SESSION_IDLE_MS
Thirty minutes without a request ends a session.

Functions§

env_value
An environment variable, trimmed, or None when it is empty.
is_domain
A domain name, such as go.example.com.
is_email
What passes for an email address: something@somewhere.tld, with no spaces, quotes, or angle brackets.

Type Aliases§

AppSend
Sends one message through the app’s own mailer. A MailError it gives back, or a crate::Error::Mail, passes through as it is; any other error becomes one coded mail_app_failed.
Clock
A clock in epoch milliseconds.