keelith

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

README

Keelith

Go Reference License

Keelith 是面向 Go 服务的运行时与开发工具集,覆盖应用生命周期、依赖装配、服务治理、传输适配、配置发布、可观测性和可编程拓扑控制。

它适合希望把框架能力保留在进程边界、治理中间件和生成工具里的团队:业务代码仍然是普通 Go 函数、普通构造函数和普通协议定义,Keelith 负责把这些部件连接成可运行、可诊断、可渐进交付的服务。

核心能力

  • 应用生命周期:app 负责有序启动、健康状态、优雅停止、hook 回滚和 server 退出处理。
  • 依赖装配:di 提供实例级依赖图、模块组合、命名绑定、分组绑定、插件排序和运行时构建;项目静态 wiring 由 keelith wiring CLI 统一编译生成。
  • 配置系统:config 支持多来源合并、未知字段策略、类型绑定、订阅发布、版本化配置和重启边界。
  • 服务治理:governance 提供 timeout、retry、rate limit、bulkhead、circuit breaker、hedging、loadshed、fallback、idempotency 等按 operation.Operation 解析的中间件。
  • 传输层:根模块内置 HTTP、gRPC、SSE、WebSocket、metadata、auth、TLS reload 和 framework error 映射。
  • 可观测性与运维面:observability 和 ops 提供 App 级日志、trace、metrics、审计、健康检查、pprof、运行时状态和可编程 runtime 管理入口。
  • 可编程运行时:programmable/continuation、programmable/projection、programmable/topology 提供 durable call、投影调度、拓扑计划和流量 epoch 控制。
  • 开发工具:keelith CLI 支持项目增量生成、配置管理、doctor、依赖图检查、wiring 同步和离线模型生成;protoc-gen-go-keelith 从 Protobuf 注解生成传输适配代码。

模块

模块 导入路径 说明
核心 github.com/keelab/keelith 稳定运行时、治理、传输、CLI 和代码生成器
扩展适配 github.com/keelab/contrib etcd、Nacos、Redis、Kafka、SQL、Kubernetes、Vault、JWT、OTLP、Prometheus、Protovalidate 等外部系统适配
实验扩展 github.com/keelab/x CloudWeGo Hertz、Kitex 和 Kitex generic profile
Operator github.com/keelab/operator Kubernetes TopologyRevision API、渲染器和 namespaced controller

安装

Keelith 当前按 go.mod 中的 Go 版本开发和验证。

go install github.com/keelab/keelith/cmd/keelith@latest
go install github.com/keelab/keelith/cmd/protoc-gen-go-keelith@latest

keelith new 的模板会固定依赖模板声明的 Keelith 版本;发布包含根 Facade 的新版本时, 需要同步更新脚手架中的版本与 go.sum 自模块校验值。当前工作树新增的根 Facade 尚未进入 公开的 v0.0.3,所以从这份未发布源码 checkout 运行 CLI 时,应先用本地 replace 做 smoke 验证;完成发布后再把默认版本切到包含 Facade 的 tag。

查看 CLI 能力:

keelith --help

当前命令分组包括:

  • add:添加服务、API、依赖或应用组件。
  • config:管理版本化配置的 stage、active、history、activate、rollback。
  • doctor:检查工具链和项目完整性。
  • generate:生成 adapter、facade 或离线数据模型。
  • graph:检查服务和依赖合约。
  • new:从零创建可运行的 minimal、service 或 production 项目。
  • version:输出 CLI 的构建版本(支持 --format text|json)。
  • wiring:同步、校验和检查依赖 wiring 产物。

快速开始

最快的方式是直接创建一个最小 HTTP 项目:

keelith new hello
cd hello
go run .
# 另一个终端
curl http://127.0.0.1:8080/ping

最小路径只需要理解 New、WithName、WithHTTP、WithRoute 和 Run。生成的入口已经包含信号处理和优雅停止,不需要先执行 doctor、graph 或 wiring。

仓库当前不把示例应用作为核心模块发布物;如果只想验证 API,可直接运行上面的 Facade 代码。需要完整生产参考时,请结合 contrib/ 和 operator/ 的说明准备外部依赖, 再按部署环境补充配置。

如果要从代码开始,根包提供了一个薄的高层 Facade;它仍然复用 app.App、现有 transport 和服务 Binding:

package main

import (
	"context"
	"errors"
	"log"
	"net/http"
	"os"
	"os/signal"
	"syscall"

	keelith "github.com/keelab/keelith"
)

func main() {
	ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
	defer stop()

	application, err := keelith.New(
		keelith.WithName("hello"),
		keelith.WithHTTP(":8080"),
		keelith.WithRoute(http.MethodGet, "/ping", func(context.Context, *http.Request) (any, error) {
			return map[string]string{"message": "pong"}, nil
		}),
	)
	if err != nil {
		log.Fatal(err)
	}
	if err := application.Run(ctx); err != nil && !errors.Is(err, context.Canceled) {
		log.Fatal(err)
	}
}

需要类型化协议时,升级到标准服务模板:

keelith new orders --template service --module example.com/orders
cd orders
go run .
curl http://127.0.0.1:8080/v1/ping

它包含 Proto、生成风格的 Binding、HTTP + gRPC 和由 Keelith CLI 管理的 internal/keelithgen 产物,但默认不连接 PostgreSQL、Redis、Kafka、注册中心或远程配置。production 模板用于展示显式 Profile/Group/Config 接线;完整 Outbox、Topology 和外部依赖参考仍保留在完整 demo 与 contrib/operator 文档中。

建议按下面的顺序逐步增加概念:

最小 HTTP → 业务路由 → Binding/Proto + HTTP/gRPC → 配置/Component/Ops
→ 安全/发现/Job/Cache/Streaming/Client → DI/Continuation/Topology
→ 数据库/Outbox 与外部适配器

高级应用仍可以直接使用 app.App、di.Build、service.NewProfile 和各 transport 包。标准模板不要求业务项目手写 wiring frontend;Keelith CLI 负责生成 internal/keelithgen。

复杂项目只需用 CLI 声明业务构造函数,类型检查、依赖排序、代码生成和图校验都在 CLI 内完成:

keelith wiring add-provider ./internal/repository.NewOrderRepository \
  --as example.com/orders/internal/domain.OrderRepository
keelith wiring sync

需要多个进程入口时,由 CLI 管理 Root 声明:

keelith wiring add-root http --kind http
keelith wiring add-root worker --kind worker --provider ./internal/worker.NewServer

项目声明保存在 keelith.project.json,不包含调用表达式、构造顺序或运行时配置;生成文件带有受管标记,CLI 不会覆盖未标记的手写文件。带 di.Out 的构造函数会按字段生成独立绑定,带 Cleanup 的资源会在 Application 关闭时按逆序释放。

需要独立的运维监听器时,可在 Facade 上显式启用 keelith.WithOps(ops.WithAddress("127.0.0.1:9090"));它只加入 loopback 健康端点,debug、pprof 和 admin 端点仍需通过对应的 ops.Option 显式开启。

项目结构

路径 说明
api/ Keelith Protobuf API、错误协议和 generated manifest
app/ 应用生命周期、component 注册、drain 和 termination
cache/ 进程内缓存、codec、失效事件和策略
cmd/ keelith CLI 和 protoc-gen-go-keelith
config/ 配置源、合并、typed binding、versioned runtime
di/ 模块、provider、graph 和 topology bridge
governance/ retry、timeout、ratelimit、bulkhead、breaker、hedging 等治理中间件
middleware/ 传输无关 unary/stream middleware 组合
observability/ 日志、审计、trace、metrics、resource 和 programmable adapter
ops/ 独立运维 HTTP server 和诊断接口
programmable/ continuation、projection、topology 控制运行时
registry/、selector/ 服务注册发现抽象和节点选择策略
transport/ HTTP、gRPC、SSE、WebSocket、TLS、auth 适配
worker/、inbox/、outbox/、saga/ 后台任务、消息一致性和流程状态基础设施
contrib/ 外部系统适配模块,见 contrib/README.md
x/ 实验传输扩展,见 x/README.md
operator/ Kubernetes 拓扑 operator,见 operator/README.md

开发

安装依赖:

go mod download

常用检查:

go test ./...
make test
make vet
make verify

Makefile 通过 MODULE_DIRS 按模块运行检查;默认覆盖核心、contrib、x、operator,以及可选的 examples/programmable-commerce 示例模块(未检出该目录时请调整 MODULE_DIRS)。涉及集成能力时使用专门目标,例如:

make integration
make projection-storage-integration
make topology-kubernetes-integration
make topology-operator-integration

生成协议和兼容性检查:

make generated-check
make compatibility-check

安全与贡献

安全问题不要通过公开 Issue 报告,请遵循 SECURITY.md。贡献流程、提交规范和本地检查见 CONTRIBUTING.md。

License

Keelith 使用 Apache License 2.0。

Documentation

Overview

Package keelith for Keelith services. Advanced applications can continue to compose the lower-level app, di, service, and transport packages directly.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidOption reports an invalid high-level application option.
	ErrInvalidOption = errors.New("keelith: invalid option")
	// ErrNoListener reports an application without a configured listener.
	ErrNoListener = errors.New("keelith: no listener configured")
	// ErrNoService reports an application without a service binding or custom server.
	ErrNoService = errors.New("keelith: no service configured")
	// ErrClosed reports an application that was closed before it could run.
	ErrClosed = errors.New("keelith: application is closed")
)

Functions

This section is empty.

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

Application is a high-level lifecycle wrapper around app.App. It owns the defaults created by New and exposes the lower-level App for advanced code.

func New

func New(optionList ...Option) (application *Application, err error)

New builds a small, safe application from generated service bindings. External dependencies are never contacted by this constructor.

func (*Application) App

func (application *Application) App() *kapp.App

App returns the underlying lifecycle object for advanced integrations.

func (*Application) Close

func (application *Application) Close(ctx context.Context) error

Close is an idempotent convenience alias for Stop.

func (*Application) Config

func (application *Application) Config() *config.Manager

Config returns the configured Manager, if the application enables config. The returned Manager is application-owned and must not be closed directly.

func (*Application) ConfigRuntime

func (application *Application) ConfigRuntime() *config.Runtime

ConfigRuntime returns the application-owned configuration watcher, if one is enabled.

func (*Application) Describe

func (application *Application) Describe() Description

Describe returns a defensive, secret-free snapshot of the facade plan and current lifecycle state.

func (*Application) GRPCServer

func (application *Application) GRPCServer() *kgrpc.Server

GRPCServer returns the generated gRPC server when WithGRPC was used.

func (*Application) HTTPServer

func (application *Application) HTTPServer() *khttp.Server

HTTPServer returns the generated HTTP server when WithHTTP was used.

func (*Application) Health

func (application *Application) Health() *health.Registry

Health returns the application health registry.

func (*Application) OpsServer

func (application *Application) OpsServer() *ops.Server

OpsServer returns the generated operational server when WithOps was used.

func (*Application) Profile

func (application *Application) Profile() *service.Profile

Profile returns the immutable service profile created by New.

func (*Application) Run

func (application *Application) Run(ctx context.Context) error

Run starts the application and releases construction-owned resources after the lifecycle reaches a terminal state.

func (*Application) Stop

func (application *Application) Stop(ctx context.Context) error

Stop requests graceful shutdown and releases construction-owned resources.

type ConfigDescription

type ConfigDescription struct {
	Enabled           bool                      `json:"enabled"`
	Path              string                    `json:"path,omitempty"`
	EnvironmentPrefix string                    `json:"environment_prefix,omitempty"`
	Strict            bool                      `json:"strict"`
	Runtime           config.RuntimeDescription `json:"runtime"`
}

ConfigDescription is a secret-free configuration runtime projection.

type ConfigFileOption

type ConfigFileOption interface {
	// contains filtered or unexported methods
}

ConfigFileOption customizes the standard file-backed configuration runtime. The options are intentionally separate from Application options so the minimal path remains a single WithConfigFile call.

func WithConfigBindings

func WithConfigBindings(bindings ...config.Binding) ConfigFileOption

WithConfigBindings adds typed configuration bindings to the file manager.

func WithConfigEnvPrefix

func WithConfigEnvPrefix(prefix string) ConfigFileOption

WithConfigEnvPrefix adds an optional environment source above the file source. For example, "ORDERS" maps ORDERS_HTTP__ADDRESS to http.address.

func WithConfigKnownFields

func WithConfigKnownFields(paths ...string) ConfigFileOption

WithConfigKnownFields declares paths checked when WithConfigStrict is used.

func WithConfigPollInterval

func WithConfigPollInterval(interval time.Duration) ConfigFileOption

WithConfigPollInterval controls how often a file-backed runtime checks for a new revision. It does not cause a file read during New.

func WithConfigStrict

func WithConfigStrict() ConfigFileOption

WithConfigStrict rejects fields not listed by WithConfigKnownFields.

type Description

type Description struct {
	Name       string              `json:"name"`
	State      kapp.State          `json:"state"`
	HTTP       ListenerDescription `json:"http"`
	GRPC       ListenerDescription `json:"grpc"`
	Ops        ListenerDescription `json:"ops"`
	Profile    service.Description `json:"profile"`
	Routes     []RouteDescription  `json:"routes,omitempty"`
	Servers    []string            `json:"servers,omitempty"`
	Components []string            `json:"components,omitempty"`
	Config     *ConfigDescription  `json:"config,omitempty"`
	Graph      bool                `json:"graph"`
}

Description is a value-free snapshot of the facade's construction plan and lifecycle. It deliberately excludes secrets and concrete dependency values.

type Graph

type Graph interface {
	Close(context.Context) error
	Components() []kapp.Component
}

Graph is the minimal dependency-graph contract accepted by the facade. *di.Graph satisfies this interface without making the facade depend on the DI implementation package.

type ListenerDescription

type ListenerDescription struct {
	Enabled bool   `json:"enabled"`
	Address string `json:"address,omitempty"`
}

ListenerDescription describes one generated listener without exposing sockets or credentials.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option configures an Application.

func WithCleanup

func WithCleanup(cleanups ...func(context.Context) error) Option

WithCleanup transfers construction-owned cleanup functions to the Application. They run once, in reverse registration order, when the application stops or closes.

func WithComponent

func WithComponent(components ...kapp.Component) Option

WithComponent adds an application component whose lifecycle is managed by the returned Application.

func WithConfigFile

func WithConfigFile(path string, optionList ...ConfigFileOption) Option

WithConfigFile enables a standard file-backed configuration runtime. The file is loaded when Application.Run starts, not while New is constructing the object graph.

func WithConfigManager

func WithConfigManager(manager *config.Manager) Option

WithConfigManager supplies an already configured Manager for remote or otherwise custom configuration sources. It is an advanced escape hatch; the facade still owns the Manager's Runtime lifecycle.

func WithDefaultGRPC

func WithDefaultGRPC(address string) Option

WithDefaultGRPC supplies a generated wiring default that an explicit WithGRPC option may override. It is intended for project composition roots, not for resolving two explicit application settings.

func WithDefaultHTTP

func WithDefaultHTTP(address string) Option

WithDefaultHTTP supplies a generated wiring default that an explicit WithHTTP option may override. It is intended for project composition roots, not for resolving two explicit application settings.

func WithGRPC

func WithGRPC(address string) Option

WithGRPC enables the default gRPC listener at address.

func WithGraph

func WithGraph(graph Graph) Option

WithGraph attaches a construction graph's cleanup to the Application. The graph's lifecycle components are also registered with app.App.

func WithHTTP

func WithHTTP(address string) Option

WithHTTP enables the default HTTP listener at address.

func WithHealth

func WithHealth(registry *health.Registry) Option

WithHealth uses an application-owned health registry.

func WithMetadataPolicy

func WithMetadataPolicy(policy metadata.Policy) Option

WithMetadataPolicy replaces the default inbound metadata allowlist.

func WithMiddleware

func WithMiddleware(bundle *middleware.Bundle) Option

WithMiddleware supplies one prebuilt inbound middleware bundle to both HTTP and gRPC listeners. It is intended for advanced applications that already own an auditable middleware chain.

func WithName

func WithName(name string) Option

WithName sets the logical service name used by defaults and diagnostics.

func WithOps

func WithOps(optionList ...ops.Option) Option

WithOps enables the dedicated operational server. Only health endpoints are enabled by default; optional diagnostics still require explicit ops.Option values and retain the ops package's loopback/access-policy checks.

func WithOutput

func WithOutput(output io.Writer) Option

WithOutput selects the destination for the default structured logger.

func WithProfile

func WithProfile(profile *service.Profile) Option

WithProfile supplies an already validated service profile. When set, WithServices cannot be used in the same Application.

func WithPropagator

func WithPropagator(propagator propagation.TextMapPropagator) Option

WithPropagator replaces the default trace context propagator.

func WithRoute

func WithRoute(method, path string, handler RouteHandler) Option

WithRoute registers a small JSON HTTP route for the quick-start path. It is intentionally limited to request/response handlers; generated service bindings remain the standard API for typed HTTP and gRPC contracts.

func WithServer

func WithServer(servers ...server.Server) Option

WithServer adds an application-owned server to the lifecycle. It is an escape hatch for transports or workers that are not represented by a generated service binding.

func WithServices

func WithServices(bindings ...service.Binding) Option

WithServices registers generated service bindings for the configured listeners. Bindings may support HTTP, gRPC, or both transports.

func WithStopTimeout

func WithStopTimeout(timeout time.Duration) Option

WithStopTimeout sets the graceful shutdown deadline.

func WithStreamMiddleware

func WithStreamMiddleware(bundle *middleware.StreamBundle) Option

WithStreamMiddleware supplies a prebuilt gRPC stream middleware bundle.

func WithoutDefaultGRPC

func WithoutDefaultGRPC() Option

WithoutDefaultGRPC removes the generated gRPC listener when it has not been explicitly configured by the caller.

func WithoutDefaultHTTP

func WithoutDefaultHTTP() Option

WithoutDefaultHTTP removes the generated HTTP listener when it has not been explicitly configured by the caller.

type RouteDescription

type RouteDescription struct {
	Method string `json:"method"`
	Path   string `json:"path"`
}

RouteDescription is the value-free diagnostic projection of a quick-start route.

type RouteHandler

type RouteHandler func(context.Context, *stdhttp.Request) (any, error)

RouteHandler is the minimal HTTP handler used by the quick-start facade. Applications that need typed protocol contracts should use generated service bindings with WithServices instead.

Directories

Path Synopsis
api
v1
app
Package app defines application lifecycle, dependency, and shutdown contracts.
Package app defines application lifecycle, dependency, and shutdown contracts.
drain
Package drain coordinates service deregistration before server shutdown.
Package drain coordinates service deregistration before server shutdown.
registration
Package registration coordinates service registration after listeners start and deregistration before listeners drain.
Package registration coordinates service registration after listeners start and deregistration before listeners drain.
termination
Package termination coordinates executable-owned two-stage shutdown.
Package termination coordinates executable-owned two-stage shutdown.
Package cache provides backend-neutral read-through cache policy.
Package cache provides backend-neutral read-through cache policy.
invalidation
Package invalidation defines versioned cache invalidation events and a Worker-compatible processor.
Package invalidation defines versioned cache invalidation events and a Worker-compatible processor.
memory
Package memory provides an in-process implementation of cache.Backend.
Package memory provides an in-process implementation of cache.Backend.
Package client connects service discovery snapshots to feedback-aware selectors without owning transport connections.
Package client connects service discovery snapshots to feedback-aware selectors without owning transport connections.
cmd
keelith command
Command keelith provides project generation and diagnostics.
Command keelith provides project generation and diagnostics.
protoc-gen-go-keelith command
Command protoc-gen-go-keelith generates Keelith transport adapters.
Command protoc-gen-go-keelith generates Keelith transport adapters.
Package config provides immutable, validated, atomically published configuration snapshots.
Package config provides immutable, validated, atomically published configuration snapshots.
env
Package env provides prefix-scoped environment configuration snapshots.
Package env provides prefix-scoped environment configuration snapshots.
file
Package file provides JSON and YAML file-backed configuration snapshots.
Package file provides JSON and YAML file-backed configuration snapshots.
testsource
Package testsource provides an in-memory Config Source for tests and local composition.
Package testsource provides an in-memory Config Source for tests and local composition.
versioned
Package versioned defines provider-neutral immutable configuration revision and activation contracts.
Package versioned defines provider-neutral immutable configuration revision and activation contracts.
Package contract defines generated service and dependency manifests.
Package contract defines generated service and dependency manifests.
Package coordination defines small distributed ownership contracts: try to acquire an auto-maintained lease for a stable key, observe loss via Done/Err, and carry a fencing token on Handler contexts.
Package coordination defines small distributed ownership contracts: try to acquire an auto-maintained lease for a stable key, observe loss via Done/Err, and carry a fencing token on Handler contexts.
memory
Package memory provides process-local coordination for development and contract verification.
Package memory provides process-local coordination for development and contract verification.
Package correlation defines validated, transport-neutral request correlation identities.
Package correlation defines validated, transport-neutral request correlation identities.
di
Package di builds an instance-scoped application dependency graph.
Package di builds an instance-scoped application dependency graph.
topology
Package topology bridges Keelith dependency injection with frozen programmable local/remote component bindings.
Package topology bridges Keelith dependency injection with frozen programmable local/remote component bindings.
Package errors defines transport-neutral Keelith application errors.
Package errors defines transport-neutral Keelith application errors.
Package feature provides provider-neutral, request-scoped feature evaluation over immutable revisioned definitions.
Package feature provides provider-neutral, request-scoped feature evaluation over immutable revisioned definitions.
configured
Package configured adapts Keelith dynamic configuration to feature.Store.
Package configured adapts Keelith dynamic configuration to feature.Store.
governance
admission
Package admission applies dynamic, provider-neutral outbound drop policies.
Package admission applies dynamic, provider-neutral outbound drop policies.
attempt
Package attempt carries low-cardinality governance attempt metadata.
Package attempt carries low-cardinality governance attempt metadata.
breaker
Package breaker provides explainable service and instance circuit breakers.
Package breaker provides explainable service and instance circuit breakers.
bulkhead
Package bulkhead provides dependency-scoped concurrency isolation.
Package bulkhead provides dependency-scoped concurrency isolation.
dependency
Package dependency assembles coherent outbound dependency governance.
Package dependency assembles coherent outbound dependency governance.
failure
Package failure classifies transport-neutral invocation failures.
Package failure classifies transport-neutral invocation failures.
fallback
Package fallback provides explicit, transport-neutral degraded responses.
Package fallback provides explicit, transport-neutral degraded responses.
hedging
Package hedging provides bounded parallel attempts for idempotent methods.
Package hedging provides bounded parallel attempts for idempotent methods.
idempotency
Package idempotency provides transport-neutral, operation-scoped request deduplication with fenced ownership and bounded result replay.
Package idempotency provides transport-neutral, operation-scoped request deduplication with fenced ownership and bounded result replay.
inbound
Package inbound assembles coherent server-side request governance.
Package inbound assembles coherent server-side request governance.
loadshed
Package loadshed provides CPU-aware BBR-like concurrency shedding.
Package loadshed provides CPU-aware BBR-like concurrency shedding.
outlier
Package outlier provides passive instance health detection for selectors.
Package outlier provides passive instance health detection for selectors.
policy
Package policy defines immutable, transport-neutral method policy snapshots.
Package policy defines immutable, transport-neutral method policy snapshots.
ratelimit
Package ratelimit provides per-Operation token and concurrency limits.
Package ratelimit provides per-Operation token and concurrency limits.
retry
Package retry provides deadline-aware, budgeted full-jitter retries.
Package retry provides deadline-aware, budgeted full-jitter retries.
streamlimit
Package streamlimit provides per-stream quotas and shared message limits.
Package streamlimit provides per-stream quotas and shared message limits.
timeout
Package timeout applies Method Policy deadlines.
Package timeout applies Method Policy deadlines.
Package health provides instance-scoped lifecycle and health reporting.
Package health provides instance-scoped lifecycle and health reporting.
Package inbox provides broker-neutral transactional consumer idempotency.
Package inbox provides broker-neutral transactional consumer idempotency.
internal
cli
Package cli implements the Keelith developer command.
Package cli implements the Keelith developer command.
generator
Package generator implements Keelith's standard Protobuf code generator.
Package generator implements Keelith's standard Protobuf code generator.
generator/data
Package data generates optional Go data models from SQL DDL.
Package data generates optional Go data models from SQL DDL.
generator/kitexfacade
Package kitexfacade generates governance-safe facades around Kitex clients.
Package kitexfacade generates governance-safe facades around Kitex clients.
httptemplate
Package httptemplate parses and executes google.api.http path templates.
Package httptemplate parses and executes google.api.http path templates.
projectinfo
Package projectinfo reads the standard, filesystem-owned identity of a Go project without requiring Keelith-specific scaffold metadata.
Package projectinfo reads the standard, filesystem-owned identity of a Go project without requiring Keelith-specific scaffold metadata.
protowkt
Package protowkt centralizes Protobuf well-known-type wire projections.
Package protowkt centralizes Protobuf well-known-type wire projections.
scaffold
Package scaffold provides bounded source and contract mutations for Go projects, including the minimal application layout created by the CLI.
Package scaffold provides bounded source and contract mutations for Go projects, including the minimal application layout created by the CLI.
version
Package version reports the Keelith build version.
Package version reports the Keelith build version.
wiringcompiler
Package wiringcompiler builds and validates Keelith's static wiring graph.
Package wiringcompiler builds and validates Keelith's static wiring graph.
wiringcompiler/fixture
Package fixture contains a deliberately small but non-trivial provider graph used by wiring compiler tests.
Package fixture contains a deliberately small but non-trivial provider graph used by wiring compiler tests.
Package metadata provides immutable request metadata and explicit propagation policies.
Package metadata provides immutable request metadata and explicit propagation policies.
Package middleware defines Keelith's transport-neutral invocation model.
Package middleware defines Keelith's transport-neutral invocation model.
Package observability composes one App-scoped log/trace/metric pipeline.
Package observability composes one App-scoped log/trace/metric pipeline.
completion
Package completion defines the shared, low-cardinality result contract used by request logs, metrics, and traces.
Package completion defines the shared, low-cardinality result contract used by request logs, metrics, and traces.
logging
Package logging provides instance-scoped slog with redaction and trace IDs.
Package logging provides instance-scoped slog with redaction and trace IDs.
logging/audit
Package audit provides bounded, non-sampled security audit records.
Package audit provides bounded, non-sampled security audit records.
metrics
Package metrics provides instance-scoped OpenTelemetry RPC metrics.
Package metrics provides instance-scoped OpenTelemetry RPC metrics.
programmable
Package programmable exports bounded OpenTelemetry observers for Keelith's continuation, topology, and projection runtimes.
Package programmable exports bounded OpenTelemetry observers for Keelith's continuation, topology, and projection runtimes.
resource
Package resource defines the single service identity shared by telemetry.
Package resource defines the single service identity shared by telemetry.
tracing
Package tracing provides instance-scoped OpenTelemetry tracing.
Package tracing provides instance-scoped OpenTelemetry tracing.
Package operation defines stable identities for transport-neutral calls.
Package operation defines stable identities for transport-neutral calls.
Package ops provides an isolated operational HTTP server.
Package ops provides an isolated operational HTTP server.
Package outbox provides a storage- and broker-neutral transactional outbox dispatcher.
Package outbox provides a storage- and broker-neutral transactional outbox dispatcher.
Package placement carries immutable, low-cardinality deployment placement for one inbound service invocation.
Package placement carries immutable, low-cardinality deployment placement for one inbound service invocation.
programmable
component
Package component binds typed local or remote providers to frozen topology.
Package component binds typed local or remote providers to frozen topology.
continuation
Package continuation defines the durable state model for continuable calls.
Package continuation defines the durable state model for continuable calls.
continuation/memory
Package memory provides a process-local continuation Store.
Package memory provides a process-local continuation Store.
projection
Package projection defines transport- and storage-neutral typed projection synchronization models.
Package projection defines transport- and storage-neutral typed projection synchronization models.
projection/memory
Package memory provides an in-process projection Store.
Package memory provides an in-process projection Store.
projection/ownermemory
Package ownermemory provides a bounded single-owner projection Source.
Package ownermemory provides a bounded single-owner projection Source.
topology
Package topology defines immutable component placement plans and bindings.
Package topology defines immutable component placement plans and bindings.
topology/control
Package control applies signed, revisioned topology candidates while retaining the last known-good runtime epoch.
Package control applies signed, revisioned topology candidates while retaining the last known-good runtime epoch.
topology/planfile
Package planfile defines Keelith's strict, canonical topology plan document.
Package planfile defines Keelith's strict, canonical topology plan document.
Package registry defines infrastructure-neutral registration and discovery contracts.
Package registry defines infrastructure-neutral registration and discovery contracts.
configured
Package configured provides atomically reloadable, configuration-backed service discovery.
Package configured provides atomically reloadable, configuration-backed service discovery.
memory
Package memory provides an in-memory Registry and Discovery implementation.
Package memory provides an in-memory Registry and Discovery implementation.
Package saga provides durable, lease-fenced orchestration and compensation.
Package saga provides durable, lease-fenced orchestration and compensation.
memory
Package memory provides a process-local Saga Repository.
Package memory provides a process-local Saga Repository.
Package secret defines provider-neutral secret references and values.
Package secret defines provider-neutral secret references and values.
file
Package file provides bounded filesystem-backed secrets with polling watch.
Package file provides bounded filesystem-backed secrets with polling watch.
memory
Package memory provides an instance-scoped in-memory secret provider for development, conformance, and bootstrap use.
Package memory provides an instance-scoped in-memory secret provider for development, conformance, and bootstrap use.
Package security defines authenticated principal state shared by AuthN and AuthZ adapters.
Package security defines authenticated principal state shared by AuthN and AuthZ adapters.
authn
Package authn provides transport-neutral authentication middleware.
Package authn provides transport-neutral authentication middleware.
authz
Package authz provides transport-neutral authorization middleware and a small exact/wildcard RBAC policy.
Package authz provides transport-neutral authorization middleware and a small exact/wildcard RBAC policy.
Package selector provides feedback-aware service node selection.
Package selector provides feedback-aware service node selection.
Package server defines the lifecycle contract implemented by Keelith transports, workers, jobs, and operational endpoints.
Package server defines the lifecycle contract implemented by Keelith transports, workers, jobs, and operational endpoints.
Package service defines the immutable identity shared by runtime, registration, logs, traces, and metrics.
Package service defines the immutable identity shared by runtime, registration, logs, traces, and metrics.
transport
grpc
Package grpc provides Keelith's grpc-go transport.
Package grpc provides Keelith's grpc-go transport.
grpc/continuation
Package continuationgrpc exposes the transport-neutral Continuation Service through a bounded, authenticated gRPC v1 protocol.
Package continuationgrpc exposes the transport-neutral Continuation Service through a bounded, authenticated gRPC v1 protocol.
grpc/projection
Package projectiongrpc adapts projection Sources to a bounded gRPC stream.
Package projectiongrpc adapts projection Sources to a bounded gRPC stream.
grpcauth
Package grpcauth provides Secret-backed outbound gRPC credentials without coupling application config to plaintext authentication material.
Package grpcauth provides Secret-backed outbound gRPC credentials without coupling application config to plaintext authentication material.
http
Package http provides Keelith's standard-library HTTP transport.
Package http provides Keelith's standard-library HTTP transport.
http/continuation
Package continuationhttp implements the continuation v1 HTTP profile.
Package continuationhttp implements the continuation v1 HTTP profile.
httpauth
Package httpauth provides fail-closed outbound HTTP authentication transports without coupling callers to plaintext credential material.
Package httpauth provides fail-closed outbound HTTP authentication transports without coupling callers to plaintext credential material.
sse
Package sse defines transport-neutral Server-Sent Events values and bounded wire rendering shared by HTTP transport profiles.
Package sse defines transport-neutral Server-Sent Events values and bounded wire rendering shared by HTTP transport profiles.
tlsconfig
Package tlsconfig provides shared TLS and mTLS profiles for transports.
Package tlsconfig provides shared TLS and mTLS profiles for transports.
websocket
Package websocket provides an explicit, lifecycle-owned RFC 6455 adapter for standard Keelith HTTP routes.
Package websocket provides an explicit, lifecycle-owned RFC 6455 adapter for standard Keelith HTTP routes.
Package validation defines transport-neutral request validation and stable field violation errors.
Package validation defines transport-neutral request validation and stable field violation errors.
Package worker provides broker- and scheduler-neutral background runtimes.
Package worker provides broker- and scheduler-neutral background runtimes.
owned
Package owned decorates a worker Scheduler with distributed lease ownership.
Package owned decorates a worker Scheduler with distributed lease ownership.

Jump to

Keyboard shortcuts

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