examples/

directory
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0

Directories

Path Synopsis
Command packlab runs one of the in-memory reference apps that the product packs are tested against:
Command packlab runs one of the in-memory reference apps that the product packs are tested against:
apilab
Package apilab is APILab, a public developer API: API keys, per-key rate limits answered with 429 and Retry-After, cursor pagination, idempotent creates and webhook deliveries.
Package apilab is APILab, a public developer API: API keys, per-key rate limits answered with 429 and Retry-After, cursor pagination, idempotent creates and webhook deliveries.
authlab
Package authlab is AuthLab, a small OAuth 2.0 and OpenID Connect token service: password, refresh-token and client-credentials grants, userinfo, introspection and revocation, with Ed25519-signed JWT access tokens.
Package authlab is AuthLab, a small OAuth 2.0 and OpenID Connect token service: password, refresh-token and client-credentials grants, userinfo, introspection and revocation, with Ed25519-signed JWT access tokens.
banklab
Package banklab is BankLab, a retail bank's API: customers with current and savings accounts, transaction history, monthly statements, transfers and bill payments that take an Idempotency-Key, and a reconciliation check.
Package banklab is BankLab, a retail bank's API: customers with current and savings accounts, transaction history, monthly statements, transfers and bill payments that take an Idempotency-Key, and a reconciliation check.
chatlab
Package chatlab is ChatLab, a chat service: rooms, message history over HTTP and live messages over WebSocket with fan-out to every member.
Package chatlab is ChatLab, a chat service: rooms, message history over HTTP and live messages over WebSocket with fan-out to every member.
dblab
Package dblab is DBLab, the data tier of a shop: PostgreSQL tables for customers, products and orders, seeded into a database you give it, and an in-process Redis (miniredis) with a product cache and a popularity ranking.
Package dblab is DBLab, the data tier of a shop: PostgreSQL tables for customers, products and orders, seeded into a database you give it, and an in-process Redis (miniredis) with a product cache and a popularity ranking.
edgelab
Package edgelab is EdgeLab, a small serverless app on a simulated function platform: a link shortener whose routes are functions (create a link, redirect, stats, a link-preview image) running on instances that start cold, stay warm while used, are reclaimed when idle, and are limited in number per function.
Package edgelab is EdgeLab, a small serverless app on a simulated function platform: a link shortener whose routes are functions (create a link, redirect, stats, a link-preview image) running on instances that start cold, stay warm while used, are reclaimed when idle, and are limited in number per function.
examlab
Package examlab is ExamLab, an online learning and exam platform: courses, timed exams taken question by question with every answer saved as it is given, a WebSocket channel per exam for the timer, proctoring heartbeats and announcements, and assignment submissions checked for similarity.
Package examlab is ExamLab, an online learning and exam platform: courses, timed exams taken question by question with every answer saved as it is given, a WebSocket channel per exam for the timer, proctoring heartbeats and announcements, and assignment submissions checked for similarity.
gamelab
Package gamelab is GameLab, a game backend: sign-in and a leaderboard over HTTP, matchmaking over WebSocket, and a UDP game server that players join with the ticket matchmaking gave them and send inputs to, answered on the server's tick.
Package gamelab is GameLab, a game backend: sign-in and a leaderboard over HTTP, matchmaking over WebSocket, and a UDP game server that players join with the ticket matchmaking gave them and send inputs to, answered on the server's tick.
govlab
Package govlab is GovLab, a government services portal: exam results looked up by roll number and date of birth with downloadable PDF marksheets, notices, and an online application (sign-in by one-time code, a form in sections, document upload, submission with an acknowledgement number and a PDF receipt) with a deadline.
Package govlab is GovLab, a government services portal: exam results looked up by roll number and date of birth with downloadable PDF marksheets, notices, and an online application (sign-in by one-time code, a form in sections, document upload, submission with an acknowledgement number and a PDF receipt) with a deadline.
iotlab
Package iotlab is IoTLab, an IoT platform: an MQTT broker that devices connect to and publish readings through, an ingest service that stores every reading and acknowledges it to its device, device shadows (a desired state set over HTTP and fetched or pushed over MQTT), and a device registry and telemetry store over HTTP.
Package iotlab is IoTLab, an IoT platform: an MQTT broker that devices connect to and publish readings through, an ingest service that stores every reading and acknowledges it to its device, device shadows (a desired state set over HTTP and fetched or pushed over MQTT), and a device registry and telemetry store over HTTP.
labkit
Package labkit holds the small pieces every PackLab reference app shares: JSON helpers, fix flags, bearer tokens, a minimal OpenAPI document, a work counter used to show where the planted bottlenecks spend their time, and the App shape of the apps that also listen on another protocol.
Package labkit holds the small pieces every PackLab reference app shares: JSON helpers, fix flags, bearer tokens, a minimal OpenAPI document, a work counter used to show where the planted bottlenecks spend their time, and the App shape of the apps that also listen on another protocol.
llmlab
Package llmlab is LLMLab, an OpenAI-compatible chat completions API that streams made-up tokens over server-sent events.
Package llmlab is LLMLab, an OpenAI-compatible chat completions API that streams made-up tokens over server-sent events.
mobilelab
Package mobilelab is MobileLab, the backend of a mobile to-do and habits app, shaped like most mobile backends: remote config and feature flags fetched at launch, a minimum app version, device registration for push, delta sync of the user's items with offline changes, batched analytics events, and a GraphQL endpoint with persisted queries for the home screen.
Package mobilelab is MobileLab, the backend of a mobile to-do and habits app, shaped like most mobile backends: remote config and feature flags fetched at launch, a minimum app version, device registration for push, delta sync of the user's items with offline changes, batched analytics events, and a GraphQL endpoint with persisted queries for the home screen.
newslab
Package newslab is NewsLab, a news site: HTML home, section and article pages, an RSS feed and a JSON API, behind a page cache of the kind a CDN or reverse proxy provides (Cache-Control, ETag, Age and X-Cache headers, conditional requests).
Package newslab is NewsLab, a news site: HTML home, section and article pages, an RSS feed and a JSON API, behind a page cache of the kind a CDN or reverse proxy provides (Cache-Control, ETag, Age and X-Cache headers, conditional requests).
pipelinelab
Package pipelinelab is PipelineLab, an event pipeline: an in-process Kafka cluster (franz-go's kfake) with an orders topic, an enricher service that consumes it as the "enricher" consumer group, looks up each order's customer and writes the result to orders.enriched, and an admin API over HTTP that reports topics and consumer lag.
Package pipelinelab is PipelineLab, an event pipeline: an in-process Kafka cluster (franz-go's kfake) with an orders topic, an enricher service that consumes it as the "enricher" consumer group, looks up each order's customer and writes the result to orders.enriched, and an admin API over HTTP that reports topics and consumer lag.
ridelab
Package ridelab is RideLab, an on-demand rides and food delivery service: riders see nearby cars, ask for an ETA and request a ride or order from a restaurant; a dispatcher matches each trip to a driver; the rider follows the driver live over a WebSocket until the trip is complete; drivers' apps stream their locations over a WebSocket.
Package ridelab is RideLab, an on-demand rides and food delivery service: riders see nearby cars, ask for an ETA and request a ride or order from a restaurant; a dispatcher matches each trip to a driver; the rider follows the driver live over a WebSocket until the trip is complete; drivers' apps stream their locations over a WebSocket.
saaslab
Package saaslab is SaaSLab, a multi-tenant B2B app: sign-in, records that users create and edit, heavy reports, a REST API and a GraphQL API (with automatic persisted queries) for dashboards.
Package saaslab is SaaSLab, a multi-tenant B2B app: sign-in, records that users create and edit, heavy reports, a REST API and a GraphQL API (with automatic persisted queries) for dashboards.
sociallab
Package sociallab is SocialLab, a social network's API: a home feed built from the accounts a user follows, posts, likes, comments, follows, and notifications delivered live over a WebSocket.
Package sociallab is SocialLab, a social network's API: a home feed built from the accounts a user follows, posts, likes, comments, follows, and notifications delivered live over a WebSocket.
streamlab
Package streamlab is StreamLab, a video service that delivers HLS: a catalogue, playback sessions with signed tokens, multivariant and media playlists, MPEG-TS segments in four renditions for 30 on-demand videos, two live channels whose playlists slide forward every two seconds, and playback heartbeats.
Package streamlab is StreamLab, a video service that delivers HLS: a catalogue, playback sessions with signed tokens, multivariant and media playlists, MPEG-TS segments in four renditions for 30 on-demand videos, two live channels whose playlists slide forward every two seconds, and playback heartbeats.
ticketlab
Package ticketlab is TicketLab, a ticketing service: events with seat maps, seat holds that expire, orders, and a WebSocket waiting room in front of the headline on-sale.
Package ticketlab is TicketLab, a ticketing service: events with seat maps, seat holds that expire, orders, and a WebSocket waiting room in front of the headline on-sale.

Jump to

Keyboard shortcuts

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