Documentation
¶
Overview ¶
Package chassis provides the chassis-go toolkit version and version compatibility check.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = strings.TrimSpace(rawVersion)
Version returns the current release of chassis-go, read from the VERSION file. This is the single source of truth for the version number.
Functions ¶
func AssertVersionChecked ¶ added in v1.4.0
func AssertVersionChecked()
AssertVersionChecked crashes if RequireMajor has not been called yet. Other chassis modules call this at their entry points.
func RequireMajor ¶ added in v1.4.0
func RequireMajor(required int)
RequireMajor crashes the process if the chassis major version does not match the required version. Services must call this at the top of main() before using any other chassis module.
func ResetVersionCheck ¶ added in v1.4.0
func ResetVersionCheck()
ResetVersionCheck is for testing only — resets the version assertion state.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package call provides a resilient HTTP client with retry, circuit breaker, and timeout support using a composable builder pattern.
|
Package call provides a resilient HTTP client with retry, circuit breaker, and timeout support using a composable builder pattern. |
|
cmd
|
|
|
demo-shutdown
command
Command demo-shutdown verifies that lifecycle.Run handles SIGTERM correctly, cancels Contexts, and drains gracefully.
|
Command demo-shutdown verifies that lifecycle.Run handles SIGTERM correctly, cancels Contexts, and drains gracefully. |
|
Package config provides a generic, reflection-based configuration loader that populates structs from environment variables using struct tags.
|
Package config provides a generic, reflection-based configuration loader that populates structs from environment variables using struct tags. |
|
Package errors provides a unified error type with dual HTTP and gRPC status codes.
|
Package errors provides a unified error type with dual HTTP and gRPC status codes. |
|
examples
|
|
|
01-cli
command
Example 01-cli demonstrates a simple CLI tool using config + logz.
|
Example 01-cli demonstrates a simple CLI tool using config + logz. |
|
02-service
command
Example 02-service demonstrates a reference gRPC service using config + logz + lifecycle + grpckit + health.
|
Example 02-service demonstrates a reference gRPC service using config + logz + lifecycle + grpckit + health. |
|
03-client
command
Example 03-client demonstrates the call package with retries and circuit breaking.
|
Example 03-client demonstrates the call package with retries and circuit breaking. |
|
04-full-service
command
Example 04-full-service demonstrates all chassis 4.0 modules wired together: config, logz, lifecycle, errors, secval, metrics, health, httpkit, grpckit, otel.
|
Example 04-full-service demonstrates all chassis 4.0 modules wired together: config, logz, lifecycle, errors, secval, metrics, health, httpkit, grpckit, otel. |
|
Package grpckit provides gRPC server utilities including standard interceptors for logging, panic recovery, and health-check registration.
|
Package grpckit provides gRPC server utilities including standard interceptors for logging, panic recovery, and health-check registration. |
|
Package health provides composable health checks with parallel execution and a standard HTTP handler that returns structured JSON results.
|
Package health provides composable health checks with parallel execution and a standard HTTP handler that returns structured JSON results. |
|
Package httpkit provides standard HTTP middleware and response utilities.
|
Package httpkit provides standard HTTP middleware and response utilities. |
|
Package lifecycle provides a minimal orchestration primitive for running concurrent components that share a single context for cancellation and graceful shutdown via OS signals.
|
Package lifecycle provides a minimal orchestration primitive for running concurrent components that share a single context for cancellation and graceful shutdown via OS signals. |
|
Package logz provides structured JSON logging with trace ID propagation.
|
Package logz provides structured JSON logging with trace ID propagation. |
|
Package metrics provides OpenTelemetry metrics with cardinality protection.
|
Package metrics provides OpenTelemetry metrics with cardinality protection. |
|
Package otel bootstraps OpenTelemetry trace and metric pipelines for chassis-go services.
|
Package otel bootstraps OpenTelemetry trace and metric pipelines for chassis-go services. |
|
Package secval provides JSON security validation: dangerous key detection and nesting depth limits.
|
Package secval provides JSON security validation: dangerous key detection and nesting depth limits. |
|
Package testkit provides lightweight test helpers for chassis-go services.
|
Package testkit provides lightweight test helpers for chassis-go services. |
|
Package work provides structured concurrency primitives with bounded parallelism and OpenTelemetry tracing.
|
Package work provides structured concurrency primitives with bounded parallelism and OpenTelemetry tracing. |
Click to show internal directories.
Click to hide internal directories.