neokit

module
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT

README

neokit

Small, domain-free Go building blocks extracted from NeoGate, a private household server project: structured logging, an HTTP client with retries and SSRF guarding, GoFiber helpers, a stale-while-revalidate cache, and a SQLite migration runner.

Pre-1.0: the API may change between v0.x releases.

Packages

Package What
logx slog context handler, canonical Err attribute, request-id propagation
httpc NewHTTPClient, BaseClient, retry transport, APIError, Classify, SSRF guard
fiberx {"error": …} envelope, bind+validate, metrics/logging middleware, rate limiters
cache stale-while-revalidate GetOrFetch
sqlitex PRAGMA user_version append-only migration runner
tracing metrics OpenTelemetry and Prometheus wiring
safe ids clock goroutine recovery, id/token generation, injectable clock

MIT.

Directories

Path Synopsis
Package cache provides a tiny in-memory TTL cache with per-key single-flight and stale-while-revalidate refreshes.
Package cache provides a tiny in-memory TTL cache with per-key single-flight and stale-while-revalidate refreshes.
Package fiberx holds cross-cutting Fiber v3 HTTP helpers: the error envelope, request binding/validation, metrics+logging middleware, rate limiting and optimistic-concurrency helpers.
Package fiberx holds cross-cutting Fiber v3 HTTP helpers: the error envelope, request binding/validation, metrics+logging middleware, rate limiting and optimistic-concurrency helpers.
Package logx holds the small slog helpers that make logs correlatable and consistent: a request-ID carried on the context, a handler decorator that stamps it onto every record, and a canonical error attribute.
Package logx holds the small slog helpers that make logs correlatable and consistent: a request-ID carried on the context, a handler decorator that stamps it onto every record, and a canonical error attribute.
Package metrics wires the OpenTelemetry metrics pillar — the sibling of package tracing, and the third leg (with tracing plus the trace-correlated logs logx already emits) of a full traces + metrics + logs setup.
Package metrics wires the OpenTelemetry metrics pillar — the sibling of package tracing, and the third leg (with tracing plus the trace-correlated logs logx already emits) of a full traces + metrics + logs setup.
Package sqlitex holds SQLite mechanism with no schema of its own.
Package sqlitex holds SQLite mechanism with no schema of its own.
Package tracing wires OpenTelemetry distributed tracing for the HTTP server.
Package tracing wires OpenTelemetry distributed tracing for the HTTP server.

Jump to

Keyboard shortcuts

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