motd

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package motd fetches the shared Message of the Day from profullstack.com and caches it in memory, refreshing in the background. The hub MOTD reads the cached value (never blocking session start); a failed fetch keeps the last known value. Set AGENTBBS_MOTD_URL to override the source (empty disables).

Index

Constants

View Source
const DefaultURL = "https://profullstack.com/motd"

DefaultURL is the canonical shared MOTD endpoint (plain text, CORS-open).

Variables

This section is empty.

Functions

func Current

func Current() string

Current returns the most recently fetched MOTD, or "" if none has been fetched yet (or fetching is disabled/failing).

func Start

func Start(ctx context.Context, url string, every time.Duration)

Start fetches the MOTD once (blocking, with a short timeout so a slow source can't stall boot for long) then refreshes every `every` until ctx is done. A url of "" disables fetching entirely.

Types

This section is empty.

Jump to

Keyboard shortcuts

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