Directories
¶
| Path | Synopsis |
|---|---|
|
v1
|
|
|
app/cli
Package cli is the public facade for the SDK's command-line domain: the sub-commands, the generated help and the typed exit status that the stdlib's flag package deliberately does not have.
|
Package cli is the public facade for the SDK's command-line domain: the sub-commands, the generated help and the typed exit status that the stdlib's flag package deliberately does not have. |
|
app/config
Package config is the public facade for the SDK's configuration domain: layer configuration from env + files, Load into a typed struct (later sources override earlier), self-Validator the result, and PollWatcher for cross-OS hot-reload.
|
Package config is the public facade for the SDK's configuration domain: layer configuration from env + files, Load into a typed struct (later sources override earlier), self-Validator the result, and PollWatcher for cross-OS hot-reload. |
|
app/events
Package events is the public facade for the SDK's IN-PROCESS event bus: one fact is published, and every listener registered for that fact's type reacts to it, in an order you choose, on your goroutine, before Publish returns.
|
Package events is the public facade for the SDK's IN-PROCESS event bus: one fact is published, and every listener registered for that fact's type reacts to it, in an order you choose, on your goroutine, before Publish returns. |
|
app/health
Package health is the public facade for the SDK's process-health domain: the three probes an orchestrator asks, and the checks that answer them.
|
Package health is the public facade for the SDK's process-health domain: the three probes an orchestrator asks, and the checks that answer them. |
|
app/i18n
Package i18n is the public facade for the SDK's message-translation domain: a catalogue of translated messages, CLDR plural forms that are right in Polish and Arabic and not only in English, and Accept-Language negotiation that never fails a request.
|
Package i18n is the public facade for the SDK's message-translation domain: a catalogue of translated messages, CLDR plural forms that are right in Polish and Arabic and not only in English, and Accept-Language negotiation that never fails a request. |
|
app/id
Package id is the public facade for SDK identifier generation.
|
Package id is the public facade for SDK identifier generation. |
|
app/lifecycle
Package lifecycle is the public facade for the SDK's ordered start/stop domain: components come up in the order you declare them, and go down in the exact reverse.
|
Package lifecycle is the public facade for the SDK's ordered start/stop domain: components come up in the order you declare them, and go down in the exact reverse. |
|
app/lock
Package lock is the public facade for the SDK's mutual exclusion: named, exclusive, fenced leases over one process or over one machine.
|
Package lock is the public facade for the SDK's mutual exclusion: named, exclusive, fenced leases over one process or over one machine. |
|
app/mail
Package mail is the public facade for the SDK's electronic-mail domain: build a message as a value, and hand it to a transport that refuses to lie about what it sent.
|
Package mail is the public facade for the SDK's electronic-mail domain: build a message as a value, and hand it to a transport that refuses to lie about what it sent. |
|
app/mail/spool
Package spool is the public facade for the durable mail outbox: the place a mail waits between the call that wants it sent and the relay that takes it.
|
Package spool is the public facade for the durable mail outbox: the place a mail waits between the call that wants it sent and the relay that takes it. |
|
app/resilience
Package resilience is the public facade for the SDK's reliability policies: retry, circuit-breaker, rate-limit, bulkhead, timeout, fallback, and hedging.
|
Package resilience is the public facade for the SDK's reliability policies: retry, circuit-breaker, rate-limit, bulkhead, timeout, fallback, and hedging. |
|
app/scheduler
Package scheduler is the public facade for the SDK's time-driven execution domain: a five-field POSIX cron parser, a fixed-interval schedule, and an engine that fires jobs on either.
|
Package scheduler is the public facade for the SDK's time-driven execution domain: a five-field POSIX cron parser, a fixed-interval schedule, and an engine that fires jobs on either. |
|
app/statemachine
Package statemachine is a state-machine engine over stored entities (ADR 0120): declare the states an entity goes through and the transitions between them, hand the engine your store, and it moves entities along — on the events you fire, and by itself on timers, deadlines and guards.
|
Package statemachine is a state-machine engine over stored entities (ADR 0120): declare the states an entity goes through and the transitions between them, hand the engine your store, and it moves entities along — on the events you fire, and by itself on timers, deadlines and guards. |
|
app/validation
Package validation is the public facade for the SDK's value-checking domain: a small set of constraints, the combinators that compose them, and a struct-tag front end — all producing one Report that says WHERE each failure is and WHY.
|
Package validation is the public facade for the SDK's value-checking domain: a small set of constraints, the combinators that compose them, and a struct-tag front end — all producing one Report that says WHERE each failure is and WHY. |
|
app/view
Package view is the public facade for the SDK's server-side rendering: a named template plus a data value become a complete HTML document, escaped according to the context each value lands in.
|
Package view is the public facade for the SDK's server-side rendering: a named template plus a data value become a complete HTML document, escaped according to the context each value lands in. |
|
clock
Package clock is the public facade for the SDK's time port: the interfaces a caller injects a time source through, the production clock, and the manual clock a test drives by hand.
|
Package clock is the public facade for the SDK's time port: the interfaces a caller injects a time source through, the production clock, and the manual clock a test drives by hand. |
|
collections/heap
Package heap is a binary heap of any element type, ordered by a comparison you give it: Push in O(log n), Pop the element that sorts first in O(log n), Peek at it in O(1).
|
Package heap is a binary heap of any element type, ordered by a comparison you give it: Push in O(log n), Pop the element that sorts first in O(log n), Peek at it in O(1). |
|
collections/ring
Package ring is a bounded, lock-free queue for exactly ONE producer and exactly ONE consumer: a fixed number of slots, a write that refuses when they are full, and a read that refuses when they are empty — neither ever blocks.
|
Package ring is a bounded, lock-free queue for exactly ONE producer and exactly ONE consumer: a fixed number of slots, a write that refuses when they are full, and a read that refuses when they are empty — neither ever blocks. |
|
concur/batcher
Package batcher coalesces items into batches: Add appends, and a deliver function you supply receives them a batch at a time — when a count or a weight cap is reached, on a ticker, or when you Flush or Close.
|
Package batcher coalesces items into batches: Add appends, and a deliver function you supply receives them a batch at a time — when a count or a weight cap is reached, on a ticker, or when you Flush or Close. |
|
concur/group
Package group runs a set of tasks concurrently and gives their caller one place to wait: one bounded degree of parallelism, one error — the first, or every one of them — and the panic a child goroutine would otherwise take the whole process down with, delivered to the waiter instead.
|
Package group runs a set of tasks concurrently and gives their caller one place to wait: one bounded degree of parallelism, one error — the first, or every one of them — and the panic a child goroutine would otherwise take the whole process down with, delivered to the waiter instead. |
|
concur/recycler
Package recycler pools objects for reuse, typed: Get borrows one, Put hands it back, and the pool never hands out a value of the wrong type.
|
Package recycler pools objects for reuse, typed: Get borrows one, Put hands it back, and the pool never hands out a value of the wrong type. |
|
concur/singleflight
Package singleflight deduplicates concurrent work that names the same key: of N goroutines asking for the same thing at the same time, exactly one does the work and all N receive its result.
|
Package singleflight deduplicates concurrent work that names the same key: of N goroutines asking for the same thing at the same time, exactly one does the work and all N receive its result. |
|
concur/snapshot
Package snapshot holds read-mostly shared state copy-on-write: readers Load the current value with one atomic load — no lock, no allocation — and writers publish a whole new value, serialised so that a read-modify-write never loses a concurrent one.
|
Package snapshot holds read-mostly shared state copy-on-write: readers Load the current value with one atomic load — no lock, no allocation — and writers publish a whole new value, serialised so that a read-modify-write never loses a concurrent one. |
|
concur/worker
Package worker starts a background goroutine you can stop and join: one loop, an idempotent Stop that signals it and waits for it to return, and a Done channel closed once it has.
|
Package worker starts a background goroutine you can stop and join: one loop, an idempotent Stop that signals it and waits for it to return, and a Done channel closed once it has. |
|
crypto
Package crypto is the authenticated-encryption facade: Seal and Open with a hidden nonce.
|
Package crypto is the authenticated-encryption facade: Seal and Open with a hidden nonce. |
|
crypto/agree
Package agree is the key-agreement facade: establish a shared symmetric key between two parties from their keypairs.
|
Package agree is the key-agreement facade: establish a shared symmetric key between two parties from their keypairs. |
|
crypto/hash
Package hash is the fingerprint / content-addressing hashing facade.
|
Package hash is the fingerprint / content-addressing hashing facade. |
|
crypto/kdf
Package kdf is the key-derivation facade for KEY SEPARATION.
|
Package kdf is the key-derivation facade for KEY SEPARATION. |
|
crypto/mac
Package mac is the detached message-authentication facade.
|
Package mac is the detached message-authentication facade. |
|
crypto/password
Package password is the password-storage facade: slow, salted, self-describing hashes with transparent upgrade-on-verify.
|
Package password is the password-storage facade: slow, salted, self-describing hashes with transparent upgrade-on-verify. |
|
crypto/sign
Package sign is the detached digital-signature facade.
|
Package sign is the detached digital-signature facade. |
|
data/cache
Package cache is the public facade for the SDK's caching, and it offers two surfaces because there are two different jobs.
|
Package cache is the public facade for the SDK's caching, and it offers two surfaces because there are two different jobs. |
|
data/codec
Package codec is the universal encoder/decoder dispatch facade.
|
Package codec is the universal encoder/decoder dispatch facade. |
|
data/codec/asn1
Package asn1 registers the ASN.1 DER codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package asn1 registers the ASN.1 DER codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/baseenc
Package baseenc registers the base-N codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package baseenc registers the base-N codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/bson
Package bson is BSON, MongoDB's binary document format, implemented with the standard library alone.
|
Package bson is BSON, MongoDB's binary document format, implemented with the standard library alone. |
|
data/codec/cbor
Package cbor registers the CBOR codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package cbor registers the CBOR codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/csv
Package csv registers the CSV codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package csv registers the CSV codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/flatbuffers
Package flatbuffers registers the FlatBuffers codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package flatbuffers registers the FlatBuffers codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/form
Package form registers the application/x-www-form-urlencoded codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package form registers the application/x-www-form-urlencoded codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/json
Package json registers the JSON codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package json registers the JSON codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/jsonpatch
Package jsonpatch computes the structural difference between two JSON documents as RFC 6902 operations — add, remove and replace, each at an RFC 6901 JSON Pointer — with the value each operation writes and the value it replaces or removes (ADR 0143).
|
Package jsonpatch computes the structural difference between two JSON documents as RFC 6902 operations — add, remove and replace, each at an RFC 6901 JSON Pointer — with the value each operation writes and the value it replaces or removes (ADR 0143). |
|
data/codec/jsonshape
Package jsonshape describes how values of a Go type look on the wire under encoding/json — the JSON kind each value takes, the members an object has and under which names, which may be missing and which may be null — for a reader to show: an API's documentation, a developer console, a schema generator (ADR 0133).
|
Package jsonshape describes how values of a Go type look on the wire under encoding/json — the JSON kind each value takes, the members an object has and under which names, which may be missing and which may be null — for a reader to show: an API's documentation, a developer console, a schema generator (ADR 0133). |
|
data/codec/msgpack
Package msgpack registers the MessagePack codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package msgpack registers the MessagePack codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/multipart
Package multipart registers the multipart/form-data codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package multipart registers the multipart/form-data codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/ndjson
Package ndjson registers the NDJSON codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package ndjson registers the NDJSON codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/pem
Package pem registers the PEM codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package pem registers the PEM codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/strictjson
Package strictjson decodes exactly one JSON document into a Go value, within a byte bound, refusing what a permissive decoder lets through — and no refusal ever repeats a byte of the document.
|
Package strictjson decodes exactly one JSON document into a Go value, within a byte bound, refusing what a permissive decoder lets through — and no refusal ever repeats a byte of the document. |
|
data/codec/strictjson/httpbody
Package httpbody decodes the JSON body of an HTTP request with the strict decoder of github.com/kitsunium/sdk/pkg/v1/data/codec/strictjson, adding what only an HTTP body has.
|
Package httpbody decodes the JSON body of an HTTP request with the strict decoder of github.com/kitsunium/sdk/pkg/v1/data/codec/strictjson, adding what only an HTTP body has. |
|
data/codec/tlv
Package tlv registers the TLV codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package tlv registers the TLV codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/toml
Package toml registers the TOML codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package toml registers the TOML codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/xml
Package xml registers the XML codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package xml registers the XML codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/codec/yaml
Package yaml registers the YAML codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134):
|
Package yaml registers the YAML codec with the SDK's codec registry — and no other codec — when it is imported (ADR 0134): |
|
data/docstore
Package docstore is the public facade for the SDK's document store: typed, keyed JSON documents with unique and multi-valued secondary indexes, kept in memory or persisted to a filesystem, every write durable before it returns.
|
Package docstore is the public facade for the SDK's document store: typed, keyed JSON documents with unique and multi-valued secondary indexes, kept in memory or persisted to a filesystem, every write durable before it returns. |
|
data/queue
Package queue is the public facade for the SDK's ASYNCHRONOUS, DURABLE message queue: one process publishes work, another process picks it up later, and a crash in between loses nothing.
|
Package queue is the public facade for the SDK's ASYNCHRONOUS, DURABLE message queue: one process publishes work, another process picks it up later, and a crash in between loses nothing. |
|
data/semver
Package semver orders and reads version strings under Semantic Versioning 2.0.0, written the way Go writes them — with a leading "v" — and recognises Go pseudo-versions.
|
Package semver orders and reads version strings under Semantic Versioning 2.0.0, written the way Go writes them — with a leading "v" — and recognises Go pseudo-versions. |
|
data/sql
Package sql is the public facade for the SDK's relational-database domain: transaction ownership, a pool policy, a health check and a migration runner, over the standard library's database/sql.
|
Package sql is the public facade for the SDK's relational-database domain: transaction ownership, a pool policy, a health check and a migration runner, over the standard library's database/sql. |
|
data/transform
Package transform compresses and decompresses bytes with the SDK's compressors, without the codec package (ADR 0014).
|
Package transform compresses and decompresses bytes with the SDK's compressors, without the codec package (ADR 0014). |
|
data/vfs
Package vfs is the public facade for the SDK's filesystem domain: reading stays io/fs, writing gets a contract, and publishing a file becomes one call that either replaces it completely or changes nothing at all.
|
Package vfs is the public facade for the SDK's filesystem domain: reading stays io/fs, writing gets a contract, and publishing a file becomes one call that either replaces it completely or changes nothing at all. |
|
errs
Package errs is the public facade for SDK errors — both introspection (this file) and construction (New, Wrap, the Field helpers, and the application Code range, in construct.go).
|
Package errs is the public facade for SDK errors — both introspection (this file) and construction (New, Wrap, the Field helpers, and the application Code range, in construct.go). |
|
net/client
Package client is the outbound half of the SDK's network domain (ADR 0029): an HTTP client whose posture is enforced by the transport rather than by the call site.
|
Package client is the outbound half of the SDK's network domain (ADR 0029): an HTTP client whose posture is enforced by the transport rather than by the call site. |
|
net/server
Package server — the two group options only an HTTP group reads: the header phase's own deadline and the header size cap.
|
Package server — the two group options only an HTTP group reads: the header phase's own deadline and the header size cap. |
|
net/sse
Package sse is the server side of Server-Sent Events: a unidirectional server→client stream over an ordinary HTTP response.
|
Package sse is the server side of Server-Sent Events: a unidirectional server→client stream over an ordinary HTTP response. |
|
net/static
Package static serves a tree of files — a single-page application, a documentation site, an embed.FS — over HTTP: what http.FileServerFS does, and what it does not (ADR 0130).
|
Package static serves a tree of files — a single-page application, a documentation site, an embed.FS — over HTTP: what http.FileServerFS does, and what it does not (ADR 0130). |
|
net/tlsid
Package tlsid builds TLS and mutual-TLS identities for the SDK's network domain (ADR 0029), from files on disk or from material already in memory.
|
Package tlsid builds TLS and mutual-TLS identities for the SDK's network domain (ADR 0029), from files on disk or from material already in memory. |
|
net/websocket
Package websocket is the server side of RFC 6455: an HTTP request upgraded into a bidirectional, message-oriented connection over the same socket.
|
Package websocket is the server side of RFC 6455: an HTTP request upgraded into a bidirectional, message-oriented connection over the same socket. |
|
observe/logger
Package logger — re-exports the chainable Builder API and the slice-overload LogAttrs entry point.
|
Package logger — re-exports the chainable Builder API and the slice-overload LogAttrs entry point. |
|
observe/logger/slogbridge
Package slogbridge — converts slog levels and attributes to their SDK peers.
|
Package slogbridge — converts slog levels and attributes to their SDK peers. |
|
observe/logger/writer
Package writer activates the dependency-free logger writers — "console", "file", and "rotfile" — by blank-importing their service factory packages.
|
Package writer activates the dependency-free logger writers — "console", "file", and "rotfile" — by blank-importing their service factory packages. |
|
observe/metrics
Package metrics is the public facade for the SDK's observability domain — the natural twin of the logger, shaped on the OpenTelemetry metrics DATA MODEL.
|
Package metrics is the public facade for the SDK's observability domain — the natural twin of the logger, shaped on the OpenTelemetry metrics DATA MODEL. |
|
observe/profiling
Package profiling captures and reads the running process's own profiles (ADR 0121): its CPU over a bounded window, its live heap, and its goroutines — decoded, folded onto owners you name, and grouped.
|
Package profiling captures and reads the running process's own profiles (ADR 0121): its CPU over a bounded window, its live heap, and its goroutines — decoded, folded onto owners you name, and grouped. |
|
observe/trace
Package trace is distributed tracing: the third pillar of observability beside github.com/kitsunium/sdk/pkg/v1/observe/logger and github.com/kitsunium/sdk/pkg/v1/observe/metrics.
|
Package trace is distributed tracing: the third pillar of observability beside github.com/kitsunium/sdk/pkg/v1/observe/logger and github.com/kitsunium/sdk/pkg/v1/observe/metrics. |
|
proc
Package proc is the capability-preflight facade for the process-supervision domain.
|
Package proc is the capability-preflight facade for the process-supervision domain. |
|
proc/cgroup
Package cgroup creates and manages cgroup v2 control groups to confine a process tree's memory, CPU, pids, and IO.
|
Package cgroup creates and manages cgroup v2 control groups to confine a process tree's memory, CPU, pids, and IO. |
|
proc/ipc
Package ipc is a private socket between processes of one machine — a daemon and the short-lived clients that talk to it, a product and the tool that attaches to it (ADR 0148).
|
Package ipc is a private socket between processes of one machine — a daemon and the short-lived clients that talk to it, a product and the tool that attaches to it (ADR 0148). |
|
proc/memlimit
Package memlimit derives the Go runtime soft memory limit from the control group allowance governing this process, and installs it.
|
Package memlimit derives the Go runtime soft memory limit from the control group allowance governing this process, and installs it. |
|
proc/process
Package process is the public facade for the SDK's keystone process-spawn primitive: it starts a child process under explicit credentials, in its own process group and session, and returns a handle that can wait for exit, signal the leader or its whole group, and stop the group gracefully with a SIGTERM→SIGKILL escalation.
|
Package process is the public facade for the SDK's keystone process-spawn primitive: it starts a child process under explicit credentials, in its own process group and session, and returns a handle that can wait for exit, signal the leader or its whole group, and stop the group gracefully with a SIGTERM→SIGKILL escalation. |
|
proc/reaper
Package reaper is the PID1 / subreaper zombie-collector facade.
|
Package reaper is the PID1 / subreaper zombie-collector facade. |
|
proc/rlimit
Package rlimit applies per-process resource ceilings via setrlimit(2) / prlimit64(2).
|
Package rlimit applies per-process resource ceilings via setrlimit(2) / prlimit64(2). |
|
proc/signal
Package signal is the typed signal toolbox: parse, subscribe, and forward OS signals through one ergonomic surface.
|
Package signal is the typed signal toolbox: parse, subscribe, and forward OS signals through one ergonomic surface. |
|
proc/systemd/listen
Package listen is the public facade for systemd-style socket activation (sd_listen_fds(3)): a service recovers already-bound listening sockets handed to it by an activator, and an activator hands sockets to a child it spawns.
|
Package listen is the public facade for systemd-style socket activation (sd_listen_fds(3)): a service recovers already-bound listening sockets handed to it by an activator, and an activator hands sockets to a child it spawns. |
|
proc/systemd/notify
Package notify is the public facade for the systemd sd_notify(3) readiness/watchdog protocol.
|
Package notify is the public facade for the systemd sd_notify(3) readiness/watchdog protocol. |
|
security/authz
Package authz is the public facade for the SDK's authorization domain: it answers "may this subject do this to that", and nothing else.
|
Package authz is the public facade for the SDK's authorization domain: it answers "may this subject do this to that", and nothing else. |
|
security/redact
Package redact renders values, JSON documents, text and log attributes for DISPLAY with their secrets replaced, within a byte bound, never touching what it is given.
|
Package redact renders values, JSON documents, text and log attributes for DISPLAY with their secrets replaced, within a byte bound, never touching what it is given. |
|
security/secret
Package secret is the public facade for the SDK's secret domain (ADR 0096): a Value that no rendering writes down, a Store that keeps named secrets as numbered versions, a Keyring that turns those versions into keys, and a Rotator that mints new ones on a schedule.
|
Package secret is the public facade for the SDK's secret domain (ADR 0096): a Value that no rendering writes down, a Store that keeps named secrets as numbered versions, a Keyring that turns those versions into keys, and a Rotator that mints new ones on a schedule. |
|
security/session
Package session is the public facade for the SDK's server-side session domain: an opaque identifier, a store that owns its lifetime, and a sealer that renders it as a cookie value.
|
Package session is the public facade for the SDK's server-side session domain: an opaque identifier, a store that owns its lifetime, and a sealer that renders it as a cookie value. |
|
security/token
Package token — the dotted-quad codes a consumer routes on.
|
Package token — the dotted-quad codes a consumer routes on. |
|
app
module
|
|
|
collections
module
|
|
|
concur
module
|
|
|
data
module
|
|
|
net
module
|
|
|
observe
module
|
|
|
security
module
|
Click to show internal directories.
Click to hide internal directories.