Design Patterns

Writing a circuit breaker in Go

Build a production-ready circuit breaker in Go from scratch with closed, open, and half-open states to prevent cascading failures.

Notes on building event-driven systems

Deep dive into event-driven architecture patterns. Learn publish-subscribe, CQRS, outbox pattern, eventual consistency, and handling microservice coupling.

Strategy pattern in Go

Replace inheritance with the Strategy pattern in Go using interfaces. Achieve composable, testable code without class hierarchies.

Configuring options in Go

Compare three Go option patterns: exposed structs, option constructors, and functional options. Learn when to use each for clean APIs.