Skip to content
ashtonianPublic

About

Batteries and glue code for Go services: independent, separately released modules.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

pkg

Independent Go modules for services. Install the module you need; each has its own dependencies, version, changelog and releases.

Module Import path Purpose
gowalker github.com/ashtonian/pkg/gowalker Struct-tag plumbing for libraries users configure with tags: field naming conventions, per-type metadata caching, inherited section tags, field readers/writers.
jsonvalue github.com/ashtonian/pkg/jsonvalue Fresh JSON value replacement with optional non-nil representation checks.
process github.com/ashtonian/pkg/process Bounded native subprocesses with owned descendant cleanup and separate output caps.
onepassword github.com/ashtonian/pkg/onepassword Complete bounded read-only native vault observations and exact selected-ID batches.
state github.com/ashtonian/pkg/state Durable bounded controller documents, canonical JSON identities and local lifetime locks.
gitx github.com/ashtonian/pkg/gitx Git-side plumbing for a repository's own checks: tracked-file listing, a conflict-marker check and a markdown merge driver that keeps both sides' insertions.
parse github.com/ashtonian/pkg/parse Struct tags to validated HTTP filters, sorts, keyset pages and patches, compiled to PostgreSQL/SQLite plans; Go and TypeScript client builders.
config github.com/ashtonian/pkg/config Typed, layered configuration with validation, hot reload and redaction.
httpx github.com/ashtonian/pkg/httpx HTTP standards and resilience: retries, circuit breaking, caching, compression and request budgets for net/http.
Kong provider github.com/ashtonian/pkg/config/kongprovider CLI flags as config overrides, with help derived from the config struct.

Install

go get github.com/ashtonian/pkg/config@latest
go get github.com/ashtonian/pkg/httpx@latest
go get github.com/ashtonian/pkg/gowalker@latest
go get github.com/ashtonian/pkg/jsonvalue@latest
go get github.com/ashtonian/pkg/gitx@latest
go get github.com/ashtonian/pkg/process@latest
go get github.com/ashtonian/pkg/state@latest
go get github.com/ashtonian/pkg/onepassword@latest
go get github.com/ashtonian/pkg/parse@latest

Process, state, onepassword, parse, gowalker, jsonvalue, config and its Kong provider require Go 1.27 or later; gitx and httpx require Go 1.26 or later. Install only the modules you need. Add the Kong provider for Kong CLI integration; add httpx's MessagePack, protobuf or Brotli module only for that wire format.

httpx

Compose http.RoundTripper layers and keep using an ordinary http.Client:

  • Recover from failures: safe retries, exponential backoff/jitter, Retry-After, per-origin circuit breakers and slow-request hedging.
  • Control request budgets: per-origin rate/burst limits, in-flight concurrency limits, timeouts and cancellation.
  • Reuse responses: ETag / Last-Modified revalidation, cache freshness and Vary, cache keys that include authorization/cookies and configured headers, stale-if-error fallback and background refresh.
  • Handle representations: gzip/deflate and optional Brotli, streaming/ranged responses, bounded reads and optional typed decoding.
  • Operate clients: origin-bound credentials, redacted logging and retry/cache/latency metrics hooks.

HTTP error statuses remain responses; transport and admission failures remain Go errors. Selecting a backup host/region is application-owned—httpx retries the current target and can serve permitted stale cached responses. See the supported patterns and failure behavior or the standard-client example.

Documentation

Versioning

Modules release independently with path-prefixed tags such as parse/v0.1.0, gowalker/v0.1.0, config/v0.3.0, config/kongprovider/v0.1.0 and httpx/v0.1.0. During v0, minor releases may change APIs; see versioning and each module's changelog.

License

MIT.

CI artifacts

CI stores benchmark reports, validation receipts and verified SDK packages through the shared SeaweedFS artifact actions. Configure the CI_ARTIFACT_ENDPOINT repository variable; jobs authenticate with GitHub OIDC, without storage keys. Retention and source/attempt checks remain in force. Unreadable acceptance evidence runs the selected checks. Historical GitHub receipts remain readable until expiry; new summaries expose S3 URIs and digests, retrieved through the shared download action or authenticated operator S3 access. gh run download applies only to historical GitHub artifacts. npm publishing and release assets retain their existing destinations.

About

Batteries and glue code for Go services: independent, separately released modules.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages