Benzene for Go
A Go port of Benzene, the middleware-based framework for hexagonal (ports-and-adapters) architecture: write your message handlers once, host them anywhere. Zero-dependency at the core and spec-first — it implements the language-neutral Benzene specification idiomatically in Go and interoperates on the wire with the .NET, TypeScript, and Python ports.
Documentation
Getting started
- Getting started — from an empty module to a running HTTP service in a few minutes
- AWS Lambda — one function over API Gateway, SQS, SNS, DynamoDB, and EventBridge
- Azure Functions — HTTP, Queue Storage / Service Bus, and Cosmos DB change feed
- Google Cloud — Cloud Run (HTTP) and Pub/Sub
- gRPC — the unary gRPC server and client binding
- Kafka — the consumer-group worker and producer client
- Kubernetes — one handler hosted over HTTP, SQS, and Kafka from a single binary and Deployment
- Getting started — from an empty module to a running HTTP service in a few minutes
Concepts
- Message handlers — handlers, topics, the registry, routing, and dependency injection
- Message results — the
Result[T]type and the status vocabulary, with the HTTP and gRPC mappings - Middleware — the pipeline, writing your own middleware, and the built-ins Benzene ships
- Testing — unit-test a handler and drive the whole pipeline in-memory with
benzenetest
About
- How Benzene compares — where the Go port sits relative to Dapr, the Go CDK, Watermill, and Encore
- Examples — runnable services, one per cloud host
Specification — the language-neutral core Benzene is defined by, independent of any one port. The cross-language source of truth lives in the
benzenerepo, not here:- Read the specification — core concepts, wire contracts, transport bindings, mesh contracts, the Cloud Service Profile, versioning, the porting guide, and the conformance fixtures