Help us shape the future of Go! Take the 2026 Go Developer Survey

core

package module
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package core is the root of the core module of Arkoren, a modular Go toolkit for building services. It contains no code; the core is split into focused packages:

  • arkoren.dev/core/application coordinates lifecycle hooks, runners, events, and probes.
  • arkoren.dev/core/http/router routes requests to error-returning handlers.
  • arkoren.dev/core/http/server serves an http.Handler with secure defaults.
  • arkoren.dev/core/service holds the services: contracts such as arkoren.dev/core/service/cache and arkoren.dev/core/service/database, which pair with independently versioned modules under arkoren.dev/driver.

Optional arks live under arkoren.dev/ark, and standard-library-only building blocks under arkoren.dev/foundation.

Directories

Path Synopsis
Package application coordinates ordered startup, workers, health checks, lifecycle events, and graceful shutdown.
Package application coordinates ordered startup, workers, health checks, lifecycle events, and graceful shutdown.
internal/diagnostic
Package diagnostic declares application diagnostics over explicit observations.
Package diagnostic declares application diagnostics over explicit observations.
internal/health
Package health owns check execution and cached background monitoring.
Package health owns check execution and cached background monitoring.
internal/lifecycle
Package lifecycle owns application execution and composition admission.
Package lifecycle owns application execution and composition admission.
internal/website
Package website renders the embedded public application welcome page.
Package website renders the embedded public application welcome page.
Package asyncapi publishes immutable AsyncAPI 3.1 documents without connecting to brokers or changing application behavior.
Package asyncapi publishes immutable AsyncAPI 3.1 documents without connecting to brokers or changing application behavior.
internal/graph
Package graph validates references in completed raw AsyncAPI documents.
Package graph validates references in completed raw AsyncAPI documents.
internal/schema
Package schema checks the self-contained Draft 7 documentation profile.
Package schema checks the self-contained Draft 7 documentation profile.
Package event provides a typed in-process event bus: topics fix payload types, listeners match by name or pattern, and dispatch is synchronous.
Package event provides a typed in-process event bus: topics fix payload types, listeners match by name or pattern, and dispatch is synchronous.
http
auth
Package auth authenticates requests: it resolves the user of a request and stores it in the context.
Package auth authenticates requests: it resolves the user of a request and stores it in the context.
auth/authtest
Package authtest checks auth.Authenticator implementations against the rules every authenticator shares.
Package authtest checks auth.Authenticator implementations against the rules every authenticator shares.
auth/gate
Package gate authorizes the authenticated user with plain Go rules.
Package gate authorizes the authenticated user with plain Go rules.
client
Package client provides an http.RoundTripper that retries safe outgoing requests with backoff and jitter, honoring Retry-After.
Package client provides an http.RoundTripper that retries safe outgoing requests with backoff and jitter, honoring Retry-After.
client/internal/retry
Package retry owns replay safety, attempt lifetime, and retry sequencing.
Package retry owns replay safety, attempt lifetime, and retry sequencing.
internal/bodysize
Package bodysize carries the request body size limit through a context.Context, from the body-limit middleware (arkoren.dev/core/http/middleware/bodylimit) to the request body helpers (arkoren.dev/core/http/request).
Package bodysize carries the request body size limit through a context.Context, from the body-limit middleware (arkoren.dev/core/http/middleware/bodylimit) to the request body helpers (arkoren.dev/core/http/request).
link
Package link creates and verifies signed application links that can expire, be used once, or be revoked when state changes.
Package link creates and verifies signed application links that can expire, be used once, or be revoked when state changes.
link/internal/signature
Package signature owns the versioned link MAC format, not link policy.
Package signature owns the versioned link MAC format, not link policy.
middleware/bodylimit
Package bodylimit caps request body reads for a router or group.
Package bodylimit caps request body reads for a router or group.
middleware/contenttype
Package contenttype provides opt-in middleware that rejects requests whose body media type is not allowed.
Package contenttype provides opt-in middleware that rejects requests whose body media type is not allowed.
middleware/cors
Package cors grants browser access to cross-origin responses.
Package cors grants browser access to cross-origin responses.
middleware/csrf
Package csrf provides Cross-Site Request Forgery protection middleware.
Package csrf provides Cross-Site Request Forgery protection middleware.
middleware/errormap
Package errormap provides middleware that translates errors returned by handlers into HTTP problems.
Package errormap provides middleware that translates errors returned by handlers into HTTP problems.
middleware/locale
Package locale provides middleware that picks the response language from the request and hands it to validate to translate validation messages.
Package locale provides middleware that picks the response language from the request and hands it to validate to translate validation messages.
middleware/locale/internal/negotiation
Package negotiation resolves original catalog keys from HTTP preferences.
Package negotiation resolves original catalog keys from HTTP preferences.
middleware/ratelimit
Package ratelimit provides middleware that limits requests per key with a sliding window counted in a cache, answering 429 by default with RateLimit headers.
Package ratelimit provides middleware that limits requests per key with a sliding window counted in a cache, answering 429 by default with RateLimit headers.
middleware/ratelimit/internal/window
Package window computes exact sliding-counter usage and recovery intervals.
Package window computes exact sliding-counter usage and recovery intervals.
middleware/requestlog
Package requestlog logs returned handler errors and observed 5xx responses to a slog.Logger.
Package requestlog logs returned handler errors and observed 5xx responses to a slog.Logger.
middleware/secureheaders
Package secureheaders provides HTTP security response-header middleware.
Package secureheaders provides HTTP security response-header middleware.
request
Package request reads and validates HTTP request data: parameters, headers, cookies, bodies, and the user.
Package request reads and validates HTTP request data: parameters, headers, cookies, bodies, and the user.
request/internal/decode
Package decode converts native JSON semantics to safe validation feedback.
Package decode converts native JSON semantics to safe validation feedback.
response
Package response writes HTTP responses from handlers: JSON, XML, HTML, redirects, streams, and server-sent events.
Package response writes HTTP responses from handlers: JSON, XML, HTML, redirects, streams, and server-sent events.
response/internal/stream
Package stream owns producer joining and streaming response I/O.
Package stream owns producer joining and streaming response I/O.
router
Package router provides an HTTP router with error-returning handlers, middleware, and centrally rendered Problem Details errors.
Package router provides an HTTP router with error-returning handlers, middleware, and centrally rendered Problem Details errors.
router/internal/openapi
Package openapi exports descriptive route snapshots as OpenAPI documents.
Package openapi exports descriptive route snapshots as OpenAPI documents.
router/internal/snapshot
Package snapshot defines detached route metadata for documentation export.
Package snapshot defines detached route metadata for documentation export.
server
Package server serves any http.Handler over HTTP or HTTPS with secure default timeouts, startup-time port binding, and graceful shutdown.
Package server serves any http.Handler over HTTP or HTTPS with secure default timeouts, startup-time port binding, and graceful shutdown.
session
Package session provides cache-backed HTTP session state and middleware for Arkoren applications.
Package session provides cache-backed HTTP session state and middleware for Arkoren applications.
session/internal/persistence
Package persistence owns session records, guarded writes, and retirement.
Package persistence owns session records, guarded writes, and retirement.
swagger
Package swagger serves a local Swagger UI page and pinned static assets for an application-owned OpenAPI specification URL.
Package swagger serves a local Swagger UI page and pinned static assets for an application-owned OpenAPI specification URL.
webhook
Package webhook receives inbound webhook notifications: it reads the raw body within a size limit, authenticates the request with a provider Source, hands the delivery to the handler the application bound to its event, and acknowledges acceptance with 200 after that handler succeeds.
Package webhook receives inbound webhook notifications: it reads the raw body within a size limit, authenticates the request with a provider Source, hands the delivery to the handler the application bound to its event, and acknowledges acceptance with 200 after that handler succeeds.
internal
clientop
Package clientop holds the telemetry shared by outbound I/O facades: one span per operation, a count and a duration histogram, and error classification.
Package clientop holds the telemetry shared by outbound I/O facades: one span per operation, a count and a duration histogram, and error classification.
diagnostic
Package diagnostic contains shared rendering and bounded cursor mechanics for owner-defined MCP diagnostics.
Package diagnostic contains shared rendering and bounded cursor mechanics for owner-defined MCP diagnostics.
errtype
Package errtype classifies errors into low-cardinality names for the error.type telemetry attribute.
Package errtype classifies errors into low-cardinality names for the error.type telemetry attribute.
hook
Package hook implements the request lifecycle behind router.Handler and the public request.Hooks registration interface.
Package hook implements the request lifecycle behind router.Handler and the public request.Hooks registration interface.
mcptest
Package mcptest calls owner diagnostic tools directly, without a protocol adapter.
Package mcptest calls owner diagnostic tools directly, without a protocol adapter.
name
Package name holds the name rules shared by definitions and routing keys across the repository: queue jobs, schedule entries, broadcast topics and app events.
Package name holds the name rules shared by definitions and routing keys across the repository: queue jobs, schedule entries, broadcast topics and app events.
resend
Package resend carries the number of times an outgoing HTTP request has been resent through a context.Context, from a retrying round tripper (arkoren.dev/core/http/client) to the instrumented one it wraps (arkoren.dev/core/service/telemetry), which records it as http.request.resend_count.
Package resend carries the number of times an outgoing HTTP request has been resent through a context.Context, from a retrying round tripper (arkoren.dev/core/http/client) to the instrumented one it wraps (arkoren.dev/core/service/telemetry), which records it as http.request.resend_count.
semconv
Package semconv holds the OpenTelemetry semantic-convention names that Arkoren instrumentation emits, pinned to one semconv version so every component and driver agrees on spelling.
Package semconv holds the OpenTelemetry semantic-convention names that Arkoren instrumentation emits, pinned to one semconv version so every component and driver agrees on spelling.
unwrap
Package unwrap finds a concrete driver behind wrapping drivers.
Package unwrap finds a concrete driver behind wrapping drivers.
Package mcp defines immutable, SDK-independent Model Context Protocol tools.
Package mcp defines immutable, SDK-independent Model Context Protocol tools.
Package pagination provides the offset and cursor pagination types and opaque cursor codecs shared by the database and request packages.
Package pagination provides the offset and cursor pagination types and opaque cursor codecs shared by the database and request packages.
service
broadcast
Package broadcast defines transport-neutral contracts for cross-process messages.
Package broadcast defines transport-neutral contracts for cross-process messages.
broadcast/broadcasttest
Package broadcasttest tests code that publishes or listens to broadcasts.
Package broadcasttest tests code that publishes or listens to broadcasts.
broadcast/memorybroadcast
Package memorybroadcast provides an asynchronous, in-process broadcast driver for local development.
Package memorybroadcast provides an asynchronous, in-process broadcast driver for local development.
cache
Package cache provides a vendor-neutral cache contract and typed facade.
Package cache provides a vendor-neutral cache contract and typed facade.
cache/cachetest
Package cachetest provides a conformance suite for cache.Driver implementations, modeled on testing/slogtest and testing/fstest.
Package cachetest provides a conformance suite for cache.Driver implementations, modeled on testing/slogtest and testing/fstest.
cache/internal/lease
Package lease owns cache-lock polling and serialized holder state.
Package lease owns cache-lock polling and serialized holder state.
cache/memorycache
Package memorycache provides an in-memory cache.Driver for tests, local development, and single-process applications.
Package memorycache provides an in-memory cache.Driver for tests, local development, and single-process applications.
cache/memorycache/internal/storage
Package storage owns atomic cache values, counters, expiry and sweeping.
Package storage owns atomic cache values, counters, expiry and sweeping.
crypto
Package crypto defines the authenticated-encryption contract and an Encrypter facade for typed values.
Package crypto defines the authenticated-encryption contract and an Encrypter facade for typed values.
crypto/cryptotest
Package cryptotest provides Run, a conformance suite that every crypto.Driver implementation must pass.
Package cryptotest provides Run, a conformance suite that every crypto.Driver implementation must pass.
database
Package database defines the SQL database contract and a typed facade that runs published SQL queries into typed rows, with pinned sessions, transactions, and telemetry.
Package database defines the SQL database contract and a typed facade that runs published SQL queries into typed rows, with pinned sessions, transactions, and telemetry.
database/databasetest
Package databasetest provides a conformance suite for database.Driver implementations.
Package databasetest provides a conformance suite for database.Driver implementations.
database/databasetest/internal/suite
Package suite implements database driver checks and their private fixtures.
Package suite implements database driver checks and their private fixtures.
database/migrate
Package migrate applies ordered schema migrations to a database.Database and records them in a bookkeeping table.
Package migrate applies ordered schema migrations to a database.Database and records them in a bookkeeping table.
feature
Package feature provides a vendor-neutral, read-only feature flag contract and a typed facade.
Package feature provides a vendor-neutral, read-only feature flag contract and a typed facade.
feature/featuretest
Package featuretest provides a conformance suite for feature.Driver implementations, modeled on testing/slogtest and testing/fstest.
Package featuretest provides a conformance suite for feature.Driver implementations, modeled on testing/slogtest and testing/fstest.
feature/memoryfeature
Package memoryfeature provides an in-memory feature.Driver for tests, local development, and single-process applications.
Package memoryfeature provides an in-memory feature.Driver for tests, local development, and single-process applications.
hash
Package hash defines the password-hashing contract and a Hasher facade that hashes and checks values and reports hashes that need rehashing.
Package hash defines the password-hashing contract and a Hasher facade that hashes and checks values and reports hashes that need rehashing.
hash/hashtest
Package hashtest provides Run, a conformance suite that every hash.Driver implementation must pass.
Package hashtest provides Run, a conformance suite that every hash.Driver implementation must pass.
internal/messaging
Package messaging holds the telemetry shared by the queue and broadcast facades: producer and consumer spans, trace propagation through message metadata, and the messaging.* metrics of the OpenTelemetry semantic conventions.
Package messaging holds the telemetry shared by the queue and broadcast facades: producer and consumer spans, trace propagation through message metadata, and the messaging.* metrics of the OpenTelemetry semantic conventions.
llm
Package llm provides a vendor-neutral contract for large language models and a facade for turns, streaming, and embeddings.
Package llm provides a vendor-neutral contract for large language models and a facade for turns, streaming, and embeddings.
llm/internal/engine
Package engine owns agent turn sequencing and bounded tool execution.
Package engine owns agent turn sequencing and bounded tool execution.
llm/internal/genai
Package genai holds the telemetry of the llm facades: one span per model call, embeddings request, agent run or tool call, the gen_ai.client.operation.duration histogram and the gen_ai.client.token.usage histogram, all named by arkoren.dev/core/internal/semconv after the OpenTelemetry generative AI conventions.
Package genai holds the telemetry of the llm facades: one span per model call, embeddings request, agent run or tool call, the gen_ai.client.operation.duration histogram and the gen_ai.client.token.usage histogram, all named by arkoren.dev/core/internal/semconv after the OpenTelemetry generative AI conventions.
llm/llmtest
Package llmtest provides test support for llm.Driver implementations and for code that talks to a model.
Package llmtest provides test support for llm.Driver implementations and for code that talks to a model.
mail
Package mail provides portable transactional email submission and MIME encoding.
Package mail provides portable transactional email submission and MIME encoding.
mail/internal/mime
Package mime renders validated mail projections without importing the mail facade.
Package mime renders validated mail projections without importing the mail facade.
mail/mailtest
Package mailtest provides test support for mail.Driver implementations and for code that sends mail.
Package mailtest provides test support for mail.Driver implementations and for code that sends mail.
mail/slogmail
Package slogmail provides a development mail.Driver that logs each message to a log/slog.Logger instead of sending it.
Package slogmail provides a development mail.Driver that logs each message to a log/slog.Logger instead of sending it.
payment
Package payment defines provider-neutral checkout, payment, refund, and subscription operations.
Package payment defines provider-neutral checkout, payment, refund, and subscription operations.
payment/memorypayment
Package memorypayment simulates outbound payment operations in process.
Package memorypayment simulates outbound payment operations in process.
payment/paymenttest
Package paymenttest provides a scripted outbound fake and driver conformance tests.
Package paymenttest provides a scripted outbound fake and driver conformance tests.
payment/paymenttest/internal/suite
Package suite implements deterministic payment driver conformance checks.
Package suite implements deterministic payment driver conformance checks.
push
Package push provides portable outbound push submission, not delivery.
Package push provides portable outbound push submission, not delivery.
push/pushtest
Package pushtest provides an outbound push fake and Driver conformance suite.
Package pushtest provides an outbound push fake and Driver conformance suite.
queue
Package queue provides transport-neutral asynchronous queue dispatch and execution.
Package queue provides transport-neutral asynchronous queue dispatch and execution.
queue/internal/execution
Package execution owns queue attempt execution and settlement policy.
Package execution owns queue attempt execution and settlement policy.
queue/internal/measurement
Package measurement supplies allocation measurements and race-mode metadata for tests.
Package measurement supplies allocation measurements and race-mode metadata for tests.
queue/memoryqueue
Package memoryqueue provides a non-durable, in-process queue driver for local development.
Package memoryqueue provides a non-durable, in-process queue driver for local development.
queue/memoryqueue/internal/broker
Package broker owns memory queue admission, delivery and delayed retries.
Package broker owns memory queue admission, delivery and delayed retries.
queue/queuetest
Package queuetest tests code that dispatches or consumes jobs.
Package queuetest tests code that dispatches or consumes jobs.
schedule
Package schedule runs functions on a calendar and defers one-off typed tasks.
Package schedule runs functions on a calendar and defers one-off typed tasks.
schedule/internal/calendar
Package calendar compiles bounded cron calendars and resolves wall times.
Package calendar compiles bounded cron calendars and resolves wall times.
schedule/memoryschedule
Package memoryschedule provides an in-process schedule.Driver for local development and single-replica deployments.
Package memoryschedule provides an in-process schedule.Driver for local development and single-replica deployments.
schedule/scheduletest
Package scheduletest helps test code that defers jobs and checks drivers of the schedule package.
Package scheduletest helps test code that defers jobs and checks drivers of the schedule package.
search
Package search provides a vendor-neutral full-text search contract and a typed facade.
Package search provides a vendor-neutral full-text search contract and a typed facade.
search/internal/lexicon
Package lexicon parses query syntax and supplies language-neutral words.
Package lexicon parses query syntax and supplies language-neutral words.
search/internal/scalar
Package scalar normalizes supported search operands and field lists.
Package scalar normalizes supported search operands and field lists.
search/memorysearch
Package memorysearch provides an in-memory search.Driver for tests, local development, and single-process applications.
Package memorysearch provides an in-memory search.Driver for tests, local development, and single-process applications.
search/memorysearch/internal/engine
Package engine owns memory search storage, matching, relevance and ordering.
Package engine owns memory search storage, matching, relevance and ordering.
search/searchtest
Package searchtest provides a conformance suite for search.Driver implementations, modeled on testing/slogtest and testing/fstest.
Package searchtest provides a conformance suite for search.Driver implementations, modeled on testing/slogtest and testing/fstest.
secret
Package secret provides versioned secret contracts, typed retrieval, and observed mutations.
Package secret provides versioned secret contracts, typed retrieval, and observed mutations.
secret/memorysecret
Package memorysecret provides an in-memory versioned secret.Driver for tests and local development.
Package memorysecret provides an in-memory versioned secret.Driver for tests and local development.
secret/secrettest
Package secrettest provides a conformance suite for secret.Driver implementations, modeled on testing/slogtest and testing/fstest.
Package secrettest provides a conformance suite for secret.Driver implementations, modeled on testing/slogtest and testing/fstest.
storage
Package storage defines portable streaming object storage contracts.
Package storage defines portable streaming object storage contracts.
storage/internal/transfer
Package transfer handles HTTP presentation and upload sniffing for storage.
Package transfer handles HTTP presentation and upload sniffing for storage.
storage/memorystorage
Package memorystorage provides a concurrent in-memory storage driver.
Package memorystorage provides a concurrent in-memory storage driver.
storage/storagetest
Package storagetest provides a conformance suite for storage.Driver implementations, modeled on testing/slogtest and testing/fstest.
Package storagetest provides a conformance suite for storage.Driver implementations, modeled on testing/slogtest and testing/fstest.
telemetry
Package telemetry provides a vendor-neutral observability contract: traces, metrics, and logs, for Arkoren packages and for application code.
Package telemetry provides a vendor-neutral observability contract: traces, metrics, and logs, for Arkoren packages and for application code.
telemetry/internal/httptrack
Package httptrack implements HTTP observation policy without telemetry state.
Package httptrack implements HTTP observation policy without telemetry state.
telemetry/internal/lazy
Package lazy caches the latest value built for a comparable owner.
Package lazy caches the latest value built for a comparable owner.
telemetry/memorytelemetry
Package memorytelemetry provides an in-process telemetry.TraceDriver, telemetry.MetricDriver, and telemetry.LogDriver for tests, local development, and applications that want trace IDs in logs and responses without a backend.
Package memorytelemetry provides an in-process telemetry.TraceDriver, telemetry.MetricDriver, and telemetry.LogDriver for tests, local development, and applications that want trace IDs in logs and responses without a backend.
telemetry/memorytelemetry/internal/aggregate
Package aggregate retains bounded, ordered metric label tuples.
Package aggregate retains bounded, ordered metric label tuples.
telemetry/memorytelemetry/internal/capture
Package capture copies and normalizes telemetry snapshots before storage.
Package capture copies and normalizes telemetry snapshots before storage.
telemetry/memorytelemetry/internal/tracegroup
Package tracegroup organizes retained span snapshots without storage or DTOs.
Package tracegroup organizes retained span snapshots without storage or DTOs.
telemetry/telemetrytest
Package telemetrytest tests code that emits telemetry and drivers that implement it.
Package telemetrytest tests code that emits telemetry and drivers that implement it.
telemetry/telemetrytest/internal/conformance
Package conformance exercises telemetry driver protocols and readback.
Package conformance exercises telemetry driver protocols and readback.
workflow
Package workflow defines durable, typed workflows built from retried steps, signals, and sleeps, run by a swappable engine driver.
Package workflow defines durable, typed workflows built from retried steps, signals, and sleeps, run by a swappable engine driver.
workflow/internal/envelope
Package envelope owns workflow payload framing and failure wire records.
Package envelope owns workflow payload framing and failure wire records.
workflow/internal/execution
Package execution protects registered workflow and step invocations.
Package execution protects registered workflow and step invocations.
workflow/memoryworkflow
Package memoryworkflow provides an in-process workflow.Driver for local development and single-replica deployments.
Package memoryworkflow provides an in-process workflow.Driver for local development and single-replica deployments.
workflow/memoryworkflow/internal/engine
Package engine owns in-process workflow runs, worker lifetime, and retention.
Package engine owns in-process workflow runs, worker lifetime, and retention.
workflow/workflowtest
Package workflowtest helps test code that starts workflows and checks drivers of the workflow package.
Package workflowtest helps test code that starts workflows and checks drivers of the workflow package.

Jump to

Keyboard shortcuts

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