Documentation
¶
Overview ¶
Package plumego is the convenience entry point for the plumego HTTP toolkit.
New returns an *core.App assembled from the default configuration, making it the minimal import for a new service:
app := plumego.New()
app.Get("/ping", http.HandlerFunc(pingHandler))
log.Fatal(http.ListenAndServe(":8080", app))
All routing, middleware, and lifecycle methods are on *core.App. For a non-default address, use NewWithConfig:
cfg := plumego.DefaultConfig() cfg.Addr = ":9090" app := plumego.NewWithConfig(cfg)
For production wiring with explicit logger injection, use core.New directly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns an *core.App assembled from DefaultConfig with no injected dependencies. It is the minimal entry point for a plumego service.
For a non-default address, timeouts, or TLS, use NewWithConfig. For explicit logger injection, use core.New.
func NewWithConfig ¶
NewWithConfig returns an *core.App assembled from the provided configuration with no injected dependencies.
Start from DefaultConfig and override only the fields your service requires:
cfg := plumego.DefaultConfig() cfg.Addr = ":9090" app := plumego.NewWithConfig(cfg)
Types ¶
type AppConfig ¶
AppConfig is an alias for core.AppConfig. Use DefaultConfig as the starting point and override only the fields your service requires.
func DefaultConfig ¶
func DefaultConfig() AppConfig
DefaultConfig returns the canonical baseline application configuration: address ":8080", 30 s read/write timeouts, 5 s header timeout, 1 MiB max header bytes, and HTTP/2 enabled.
type AppDependencies ¶
type AppDependencies = core.AppDependencies
AppDependencies is an alias for core.AppDependencies.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
plumego
module
|
|
|
Package contract provides Plumego's canonical HTTP response, error, and request metadata contracts.
|
Package contract provides Plumego's canonical HTTP response, error, and request metadata contracts. |
|
Package core provides Plumego's HTTP application kernel.
|
Package core provides Plumego's HTTP application kernel. |
|
Package health defines transport-agnostic health state, readiness status, and component health models.
|
Package health defines transport-agnostic health state, readiness status, and component health models. |
|
internal
|
|
|
checks/agent-workflow
command
|
|
|
checks/community-extension
command
|
|
|
checks/cross-extension-deps
command
cross-extension-deps verifies that x/* packages do not import paths listed in their own module.yaml forbidden_imports field.
|
cross-extension-deps verifies that x/* packages do not import paths listed in their own module.yaml forbidden_imports field. |
|
checks/dependency-rules
command
|
|
|
checks/deprecation-inventory
command
|
|
|
checks/extension-api-snapshot
command
|
|
|
checks/extension-beta-evidence
command
|
|
|
checks/extension-maturity
command
|
|
|
checks/module-manifests
command
|
|
|
checks/public-entrypoints-sync
command
|
|
|
checks/reference-layout
command
|
|
|
nethttp
Package nethttp provides a production-ready HTTP client with automatic retry and backoff.
|
Package nethttp provides a production-ready HTTP client with automatic retry and backoff. |
|
semver
Package semver provides semantic versioning support without external dependencies.
|
Package semver provides semantic versioning support without external dependencies. |
|
stringsx
Package stringsx provides string utility functions.
|
Package stringsx provides string utility functions. |
|
tools/doc-snippets
command
|
|
|
Package log provides Plumego's stable logging interfaces and base logger implementations.
|
Package log provides Plumego's stable logging interfaces and base logger implementations. |
|
Package metrics provides the stable metrics contracts and small in-memory base collectors.
|
Package metrics provides the stable metrics contracts and small in-memory base collectors. |
|
Package middleware provides the canonical HTTP middleware composition primitive for Plumego services.
|
Package middleware provides the canonical HTTP middleware composition primitive for Plumego services. |
|
abuseguard
Package abuseguard adapts stable abuse primitives to HTTP middleware.
|
Package abuseguard adapts stable abuse primitives to HTTP middleware. |
|
accesslog
Package accesslog provides HTTP access logging middleware for Plumego services.
|
Package accesslog provides HTTP access logging middleware for Plumego services. |
|
recovery
Package recovery provides panic recovery middleware for HTTP request handlers.
|
Package recovery provides panic recovery middleware for HTTP request handlers. |
|
requestid
Package requestid provides HTTP middleware and helpers for request correlation IDs.
|
Package requestid provides HTTP middleware and helpers for request correlation IDs. |
|
securityheaders
Package securityheaders provides the HTTP security-header middleware.
|
Package securityheaders provides the HTTP security-header middleware. |
|
singleflight
Package singleflight provides request coalescing middleware.
|
Package singleflight provides request coalescing middleware. |
|
tracing
Package tracing provides a transport-layer tracing middleware.
|
Package tracing provides a transport-layer tracing middleware. |
|
Package router provides Plumego's HTTP route matching, path parameter, grouping, and reverse URL primitives.
|
Package router provides Plumego's HTTP route matching, path parameter, grouping, and reverse URL primitives. |
|
security
|
|
|
abuse
Package abuse provides rate limiting and anti-abuse protection.
|
Package abuse provides rate limiting and anti-abuse protection. |
|
authn
Package authn provides stable authentication and authorization primitives.
|
Package authn provides stable authentication and authorization primitives. |
|
headers
Package headers provides HTTP security header policy primitives.
|
Package headers provides HTTP security header policy primitives. |
|
input
Package input provides security-focused input validation and basic defense-in-depth sanitization utilities.
|
Package input provides security-focused input validation and basic defense-in-depth sanitization utilities. |
|
jwt
Package jwt provides JSON Web Token (JWT) generation, verification, and management with key rotation support.
|
Package jwt provides JSON Web Token (JWT) generation, verification, and management with key rotation support. |
|
password
Package password provides secure password hashing and strength validation.
|
Package password provides secure password hashing and strength validation. |
|
Package store provides stable, transport-agnostic storage primitives.
|
Package store provides stable, transport-agnostic storage primitives. |
|
cache
Package cache provides a small in-memory cache primitive with TTL-aware and memory-bounded eviction.
|
Package cache provides a small in-memory cache primitive with TTL-aware and memory-bounded eviction. |
|
db
Package db provides small stdlib-shaped SQL helpers.
|
Package db provides small stdlib-shaped SQL helpers. |
|
file
Package file provides stable, transport-agnostic contracts, shared types, and errors for file storage operations.
|
Package file provides stable, transport-agnostic contracts, shared types, and errors for file storage operations. |
|
idempotency
Package idempotency defines stable, storage-agnostic contracts for idempotent request processing.
|
Package idempotency defines stable, storage-agnostic contracts for idempotent request processing. |
|
kv
Package kvstore provides a small embedded persistent key-value primitive.
|
Package kvstore provides a small embedded persistent key-value primitive. |
|
x
|
|
|
ai
Package ai documents Plumego's AI capability family.
|
Package ai documents Plumego's AI capability family. |
|
ai/distributed
Package distributed provides distributed workflow execution capabilities.
|
Package distributed provides distributed workflow execution capabilities. |
|
ai/filter
Package filter provides content filtering for AI inputs and outputs.
|
Package filter provides content filtering for AI inputs and outputs. |
|
ai/instrumentation
Package instrumentation provides observability wrappers for AI components.
|
Package instrumentation provides observability wrappers for AI components. |
|
ai/llmcache
Package llmcache provides intelligent caching for LLM responses.
|
Package llmcache provides intelligent caching for LLM responses. |
|
ai/marketplace
Package marketplace provides an agent and workflow registry for discovering, installing, and rating AI agents and workflow templates.
|
Package marketplace provides an agent and workflow registry for discovering, installing, and rating AI agents and workflow templates. |
|
ai/metrics
Package metrics provides AI-specific observability interfaces for the x/ai extension family.
|
Package metrics provides AI-specific observability interfaces for the x/ai extension family. |
|
ai/multimodal
Package multimodal provides multimodal content support for AI providers.
|
Package multimodal provides multimodal content support for AI providers. |
|
ai/orchestration
Package orchestration provides agent workflow orchestration.
|
Package orchestration provides agent workflow orchestration. |
|
ai/prompt
Package prompt provides template management for AI prompts.
|
Package prompt provides template management for AI prompts. |
|
ai/provider
Package provider provides a unified interface for LLM providers.
|
Package provider provides a unified interface for LLM providers. |
|
ai/resilience
Package resilience provides resilience wrappers for AI providers.
|
Package resilience provides resilience wrappers for AI providers. |
|
ai/semanticcache
Package semanticcache provides semantic caching for LLM responses using embeddings.
|
Package semanticcache provides semantic caching for LLM responses using embeddings. |
|
ai/session
Package session provides conversation session management for AI agents.
|
Package session provides conversation session management for AI agents. |
|
ai/sse
Package sse provides Server-Sent Events (SSE) support for streaming AI responses.
|
Package sse provides Server-Sent Events (SSE) support for streaming AI responses. |
|
ai/streaming
Package streaming provides real-time progress updates for AI workflow orchestration.
|
Package streaming provides real-time progress updates for AI workflow orchestration. |
|
ai/tokenizer
Package tokenizer provides token counting for AI models.
|
Package tokenizer provides token counting for AI models. |
|
ai/tool
Package tool provides function calling framework for AI agents.
|
Package tool provides function calling framework for AI agents. |
|
data
Package data provides topology-heavy data capabilities that do not belong in the stable store layer.
|
Package data provides topology-heavy data capabilities that do not belong in the stable store layer. |
|
data/cache
Package cache provides extension-layer cache adapters and topology-heavy cache implementations.
|
Package cache provides extension-layer cache adapters and topology-heavy cache implementations. |
|
data/cache/leaderboard
Package leaderboard provides Plumego-local in-memory ranked-data cache behavior on top of the stable store/cache primitives.
|
Package leaderboard provides Plumego-local in-memory ranked-data cache behavior on top of the stable store/cache primitives. |
|
data/cache/redis
Package redis adapts caller-owned Redis clients to store/cache.Cache.
|
Package redis adapts caller-owned Redis clients to store/cache.Cache. |
|
data/file
Package file provides tenant-aware file storage implementations backed by the store/file interfaces.
|
Package file provides tenant-aware file storage implementations backed by the store/file interfaces. |
|
data/internal/testx
Package testx provides shared test utilities for x/data subpackages.
|
Package testx provides shared test utilities for x/data subpackages. |
|
data/kvengine
Package kvengine provides a durable embedded key-value engine with WAL.
|
Package kvengine provides a durable embedded key-value engine with WAL. |
|
data/migrate
Package migrate defines a dependency-free migration runner contract for x/data callers.
|
Package migrate defines a dependency-free migration runner contract for x/data callers. |
|
data/pgx
Package pgx defines a small explicit PostgreSQL-style query and transaction surface for x/data callers without importing a concrete driver.
|
Package pgx defines a small explicit PostgreSQL-style query and transaction surface for x/data callers without importing a concrete driver. |
|
data/sharding
Package sharding provides database sharding strategies and utilities for horizontal data partitioning across multiple database instances.
|
Package sharding provides database sharding strategies and utilities for horizontal data partitioning across multiple database instances. |
|
data/sqlx
Package sqlx defines a small explicit database/sql query and transaction surface for x/data callers.
|
Package sqlx defines a small explicit database/sql query and transaction surface for x/data callers. |
|
fileapi
Package fileapi provides an HTTP handler for tenant-aware file operations.
|
Package fileapi provides an HTTP handler for tenant-aware file operations. |
|
frontend
Package frontend provides explicit static and embedded asset serving for single-page applications and other frontend distributions.
|
Package frontend provides explicit static and embedded asset serving for single-page applications and other frontend distributions. |
|
gateway
Package gateway provides reverse proxy handlers for plumego
|
Package gateway provides reverse proxy handlers for plumego |
|
gateway/cache
Package cache provides HTTP response caching middleware
|
Package cache provides HTTP response caching middleware |
|
gateway/discovery
Package discovery provides service discovery interfaces and implementations
|
Package discovery provides service discovery interfaces and implementations |
|
gateway/ipc
Package ipc provides cross-platform inter-process communication (IPC) primitives.
|
Package ipc provides cross-platform inter-process communication (IPC) primitives. |
|
gateway/protocol
Package protocol provides interface contracts for gateway protocol adapters.
|
Package protocol provides interface contracts for gateway protocol adapters. |
|
gateway/transform
Package transform provides request/response transformation middleware
|
Package transform provides request/response transformation middleware |
|
messaging/mq
Package mq provides an in-process message broker with advanced features.
|
Package mq provides an in-process message broker with advanced features. |
|
messaging/scheduler
Package scheduler provides lightweight in-process cron and delayed job scheduling.
|
Package scheduler provides lightweight in-process cron and delayed job scheduling. |
|
messaging/webhook
Package webhookin provides webhook receiver functionality with signature verification.
|
Package webhookin provides webhook receiver functionality with signature verification. |
|
observability/tracer
Package tracer provides a distributed tracing subsystem: Tracer, Span, Trace, TraceCollector, Sampler, and tracing ID types.
|
Package tracer provides a distributed tracing subsystem: Tracer, Span, Trace, TraceCollector, Sampler, and tracing ID types. |
|
resilience
Package resilience provides reusable circuit breaker and rate limiter primitives for the extension layer.
|
Package resilience provides reusable circuit breaker and rate limiter primitives for the extension layer. |
|
resilience/circuitbreaker
Package circuitbreaker provides circuit breaker pattern implementation
|
Package circuitbreaker provides circuit breaker pattern implementation |
|
resilience/ratelimit
Package ratelimit provides a reusable token bucket rate limiter.
|
Package ratelimit provides a reusable token bucket rate limiter. |
|
rest
Package rest provides REST resource controller primitives, query helpers, and pagination utilities for building CRUD HTTP APIs on top of the standard library.
|
Package rest provides REST resource controller primitives, query helpers, and pagination utilities for building CRUD HTTP APIs on top of the standard library. |
|
rest/versioning
Package versioning provides API version negotiation middleware
|
Package versioning provides API version negotiation middleware |
|
rpc/client
Package client provides transport-neutral RPC client pooling and unary interceptor helpers.
|
Package client provides transport-neutral RPC client pooling and unary interceptor helpers. |
|
rpc/gateway
Package gateway adapts caller-owned RPC HTTP handlers to net/http.
|
Package gateway adapts caller-owned RPC HTTP handlers to net/http. |
|
rpc/server
Package server wraps caller-owned RPC runtimes with explicit lifecycle helpers.
|
Package server wraps caller-owned RPC runtimes with explicit lifecycle helpers. |
|
tenant
Package tenant is the multi-tenancy extension surface for Plumego.
|
Package tenant is the multi-tenancy extension surface for Plumego. |
|
tenant/config
Package config contains tenant configuration contracts, database-backed management helpers, and schema assets for tenant-owned configuration state.
|
Package config contains tenant configuration contracts, database-backed management helpers, and schema assets for tenant-owned configuration state. |
|
tenant/core
Package tenant provides multi-tenancy infrastructure (EXPERIMENTAL).
|
Package tenant provides multi-tenancy infrastructure (EXPERIMENTAL). |
|
tenant/policy
Package policy contains tenant policy evaluation helpers and middleware.
|
Package policy contains tenant policy evaluation helpers and middleware. |
|
tenant/quota
Package quota contains tenant quota management helpers and middleware.
|
Package quota contains tenant quota management helpers and middleware. |
|
tenant/ratelimit
Package ratelimit contains tenant rate limit helpers and middleware.
|
Package ratelimit contains tenant rate limit helpers and middleware. |
|
tenant/resolve
Package resolve contains tenant resolution helpers and middleware.
|
Package resolve contains tenant resolution helpers and middleware. |
|
tenant/session
Package session defines session lifecycle types and interfaces for x/tenant.
|
Package session defines session lifecycle types and interfaces for x/tenant. |
|
tenant/store/cache
Package cache contains tenant-aware cache adapters.
|
Package cache contains tenant-aware cache adapters. |
|
tenant/store/db
Package db contains tenant-aware database adapters.
|
Package db contains tenant-aware database adapters. |
|
tenant/transport
Package transport contains tenant-specific transport mapping helpers.
|
Package transport contains tenant-specific transport mapping helpers. |
|
websocket
Package websocket provides an experimental WebSocket server with room-based broadcasting.
|
Package websocket provides an experimental WebSocket server with room-based broadcasting. |