Enterprise-Grade Go Microservices Framework
Engineered for Scale • Built for Production • Proven by Industry Leaders
An enterprise-grade microservices framework architected for mission-critical Go applications. Battle-tested by industry leaders including Tencent, ByteDance, and Kuaishou. Part of the EggyByte ecosystem, featuring the egg core library with a comprehensive module collection.
Launch enterprise-ready microservices instantly with intelligent defaults. Integrated configuration management, distributed tracing, and comprehensive health monitoring out of the box.
Rigorously enforced L0-L4 dependency hierarchy eliminates architectural debt. Ensures zero circular dependencies, exceptional maintainability, and seamless evolution at enterprise scale.
Real-time configuration updates via Kubernetes ConfigMap integration. Zero-downtime reconfiguration with intelligent debouncing and validation, ensuring consistent state across distributed systems.
Complete OpenTelemetry instrumentation with distributed tracing, metrics aggregation, and structured logging. Production-grade monitoring with configurable sampling and OTLP exporter support.
Modern RPC framework with automatic interceptor stacks for timeout, logging, error mapping, and distributed tracing.
Dependency injection container with type safety, lifecycle management, and clean interface-driven design patterns.
EggyByte Go implements a rigorously enforced layered architecture (L0-L4) that eliminates circular dependencies and ensures exceptional maintainability at scale. Each layer maintains strict unidirectional dependencies, enabling independent evolution and optimal compile times.
Highest-level module that integrates all components for microservice initialization
Service lifecycle, RPC framework, and client communication
Configuration, observability, and HTTP utilities
Structured logging with logfmt/JSON output
Core types and interfaces with no external dependencies
Optional modules that can depend on any layer
Comprehensive toolkit for building, deploying, and scaling enterprise microservices. Designed for mission-critical workloads with proven reliability in high-traffic production environments.
Public API separated from implementation. Easy to test, mock, and maintain with clear contracts and boundaries.
Never manually edit go.mod or go.work. Use Go's official toolchain and workspace management for reproducible builds.
Sensible configuration out of the box. Graceful shutdown, health checks, metrics, and tracing enabled by default.
Full observability with OTLP exporters. Trace requests across services, collect metrics, and debug issues in production.
ConfigMap watching for hot reload, health check endpoints, and graceful shutdown hooks for zero-downtime deployments.
Leverage Go's type system for compile-time safety. Catch errors before they reach production with strong typing.
Install egg and launch your first production-ready microservice with just a few lines of code.
# Install the service integration module
go get github.com/eggybyte-technology/egg/servicex@latest
package main
import (
"context"
"log/slog"
"github.com/eggybyte-technology/egg/configx"
"github.com/eggybyte-technology/egg/logx"
"github.com/eggybyte-technology/egg/servicex"
)
type AppConfig struct {
configx.BaseConfig
}
func register(app *servicex.App) error {
// Register your Connect handlers here
app.Mux().HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("Hello, Egg!"))
})
return nil
}
func main() {
ctx := context.Background()
// Create logger (optional)
logger := logx.New(
logx.WithFormat(logx.FormatConsole),
logx.WithLevel(slog.LevelInfo),
logx.WithColor(true),
)
cfg := &AppConfig{}
// One-line startup with full integration
err := servicex.Run(ctx,
servicex.WithService("my-service", "1.0.0"),
servicex.WithLogger(logger),
servicex.WithAppConfig(cfg), // Auto-detects database
servicex.WithRegister(register),
)
if err != nil {
logger.Error(err, "service failed to start")
}
}
# Default log level (info)
go run main.go
# With debug logging
LOG_LEVEL=debug go run main.go
# Service will start on :8080 (HTTP), :8081 (Health), :9091 (Metrics)
Each module is designed for a specific purpose and follows strict dependency rules.
L4 Integration
One-line service startup with integrated configuration, logging, database,
tracing, and graceful shutdown. The easiest way to launch a microservice.
servicex.Run(ctx, options...)
L2 Capability
Unified configuration with hot reloading from environment variables, files,
and Kubernetes ConfigMaps. Struct binding with validation.
configx.Bind(&cfg)
L1 Foundation
Structured logging based on log/slog with logfmt/JSON output, field sorting,
colorization, and payload limits for production use.
logger.Info("msg", "key", "value")
L3 Runtime
Connect-RPC interceptor stack with timeout enforcement, structured logging,
error mapping, and OpenTelemetry tracing integration.
connectx.DefaultInterceptors(opts)
L2 Capability
Simplified OpenTelemetry provider setup for tracing and metrics with
OTLP exporters, configurable sampling, and resource attributes.
obsx.NewProvider(ctx, opts)
Auxiliary
GORM-based storage abstraction with health checks, connection pooling,
and automatic migrations for MySQL, PostgreSQL, and SQLite.
storex.NewGORMStore(opts)
Explicit, readable code that's easy to understand and maintain. Small, testable units with cohesive packages.
No circular imports, clear dependency flow. Each layer can only depend on the same or lower layers.
Public API separate from implementation. Define contracts with interfaces, inject dependencies, keep concrete types unexported.
Sensible configuration out of the box. Health checks, metrics, tracing, graceful shutdown all enabled by default.
Never manually edit go.mod or go.work. Use official Go toolchain commands for reproducible, maintainable builds.
Note: EggyByte Go (project: eggybyte-go) is the official Go framework
for the EggyByte ecosystem, featuring egg as the core library along with modular components like
servicex, configx, logx, and more.
Part of a comprehensive ecosystem for modern application development. AI models, blockchain innovations, and cloud-native infrastructure.
Production-ready Go microservices framework with clean architecture, hot reload, and full observability. Core library: egg.
github.com/eggybyte-technology/egg →Oracle database integration and management tools for modern Go applications.
github.com/eggybyte-technology/yao-oracle →Blockchain infrastructure for decentralized applications and smart contracts.
chain.eggybyte.com →Kubernetes deployment charts for easy service orchestration and management.
charts.eggybyte.com →Comprehensive guides, API references, and best practices for all EggyByte projects.
docs.eggybyte.com →Open source projects, contributions welcome. Join our growing developer community.
github.com/eggybyte-technology →Leading innovations in AI and Web3 technologies
EggyByte Technology focuses on AI models and AI applications, providing information services to leading internet technology companies including Tencent, ByteDance, and Kuaishou. We build open-source tools and frameworks that empower developers worldwide.
We believe in the power of open source. Our projects like egg, Besu Config Manager, and others are freely available with active communities and low barriers to participation. We welcome contributions from developers worldwide.
Get in touch with us
📧 affair@eggybyte.com