Documentation

Complete guide to using the Egg framework for building production-ready Go microservices.

Getting Started

Install Egg and create your first microservice in minutes.

bash
go get go.eggybyte.com/egg/servicex@latest

Architecture

Four-layer architecture with strict dependency rules.

  • L4: Integration (servicex)
  • L3: Runtime & Communication (runtimex, connectx, clientx)
  • L2: Capability (configx, obsx, httpx)
  • L1: Foundation (logx)
  • L0: Core (core/errors, core/identity, core/log)

Configuration

Environment-based configuration with hot reload.

bash
export LOG_LEVEL=debug
export DB_DSN=user:pass@tcp(localhost:3306)/mydb

Observability

Structured logging, metrics, and distributed tracing.

  • Structured logging with logfmt/JSON
  • Prometheus metrics endpoint
  • OpenTelemetry tracing
  • Health check endpoints