EggyByte Go

Enterprise-Grade Go Microservices Framework
Engineered for Scale • Built for Production • Proven by Industry Leaders

What is EggyByte Go?

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.

Zero-Config Deployment

Launch enterprise-ready microservices instantly with intelligent defaults. Integrated configuration management, distributed tracing, and comprehensive health monitoring out of the box.

🏗️

Layered Architecture

Rigorously enforced L0-L4 dependency hierarchy eliminates architectural debt. Ensures zero circular dependencies, exceptional maintainability, and seamless evolution at enterprise scale.

🔄

Dynamic Configuration

Real-time configuration updates via Kubernetes ConfigMap integration. Zero-downtime reconfiguration with intelligent debouncing and validation, ensuring consistent state across distributed systems.

📊

Enterprise Observability

Complete OpenTelemetry instrumentation with distributed tracing, metrics aggregation, and structured logging. Production-grade monitoring with configurable sampling and OTLP exporter support.

🔌

Connect-RPC First

Modern RPC framework with automatic interceptor stacks for timeout, logging, error mapping, and distributed tracing.

🎯

Type-Safe DI

Dependency injection container with type safety, lifecycle management, and clean interface-driven design patterns.

Layered Design

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.

🎯 L4: Integration Layer

Highest-level module that integrates all components for microservice initialization

servicex
L3: Runtime & Communication Layer

Service lifecycle, RPC framework, and client communication

runtimex connectx clientx
🔧 L2: Capability Layer

Configuration, observability, and HTTP utilities

configx obsx httpx
📝 L1: Foundation Layer

Structured logging with logfmt/JSON output

logx
💎 L0: Core Layer (Zero Dependencies)

Core types and interfaces with no external dependencies

core/errors core/identity core/log
🔌 Auxiliary Modules

Optional modules that can depend on any layer

storex k8sx testingx

Built for Production

Comprehensive toolkit for building, deploying, and scaling enterprise microservices. Designed for mission-critical workloads with proven reliability in high-traffic production environments.

🎯

Interface-Driven Design

Public API separated from implementation. Easy to test, mock, and maintain with clear contracts and boundaries.

⚙️

CLI-Driven Development

Never manually edit go.mod or go.work. Use Go's official toolchain and workspace management for reproducible builds.

Production-Ready Defaults

Sensible configuration out of the box. Graceful shutdown, health checks, metrics, and tracing enabled by default.

📈

OpenTelemetry Integration

Full observability with OTLP exporters. Trace requests across services, collect metrics, and debug issues in production.

☸️

Kubernetes Native

ConfigMap watching for hot reload, health check endpoints, and graceful shutdown hooks for zero-downtime deployments.

🛡️

Type Safety

Leverage Go's type system for compile-time safety. Catch errors before they reach production with strong typing.

Get Started in Minutes

Install egg and launch your first production-ready microservice with just a few lines of code.

Installation bash
# Install the service integration module
go get github.com/eggybyte-technology/egg/servicex@latest
main.go - Minimal Service Go
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")
    }
}
Run Your Service bash
# 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)

Core Modules

Each module is designed for a specific purpose and follows strict dependency rules.

servicex

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...)

configx

L2 Capability
Unified configuration with hot reloading from environment variables, files, and Kubernetes ConfigMaps. Struct binding with validation.

configx.Bind(&cfg)

logx

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")

connectx

L3 Runtime
Connect-RPC interceptor stack with timeout enforcement, structured logging, error mapping, and OpenTelemetry tracing integration.

connectx.DefaultInterceptors(opts)

obsx

L2 Capability
Simplified OpenTelemetry provider setup for tracing and metrics with OTLP exporters, configurable sampling, and resource attributes.

obsx.NewProvider(ctx, opts)

storex

Auxiliary
GORM-based storage abstraction with health checks, connection pooling, and automatic migrations for MySQL, PostgreSQL, and SQLite.

storex.NewGORMStore(opts)

Production-Proven Architecture

🎯 Design Philosophy

1. Clarity over cleverness

Explicit, readable code that's easy to understand and maintain. Small, testable units with cohesive packages.

2. Layered dependencies

No circular imports, clear dependency flow. Each layer can only depend on the same or lower layers.

3. Interface-driven design

Public API separate from implementation. Define contracts with interfaces, inject dependencies, keep concrete types unexported.

4. Production-ready defaults

Sensible configuration out of the box. Health checks, metrics, tracing, graceful shutdown all enabled by default.

5. CLI-driven development

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.

⚡ Performance & Scalability

  • Efficient Resource Usage: Optimized connection pooling, graceful degradation, and smart defaults
  • Horizontal Scalability: Stateless design, distributed tracing, and Kubernetes-native architecture
  • Zero-Downtime Deployments: Graceful shutdown hooks, health check endpoints, and rolling updates support
  • Production Battle-Tested: Used by major tech companies including Tencent, ByteDance, and Kuaishou

EggyByte Technology

Part of a comprehensive ecosystem for modern application development. AI models, blockchain innovations, and cloud-native infrastructure.

🥚

EggyByte Go

Production-ready Go microservices framework with clean architecture, hot reload, and full observability. Core library: egg.

github.com/eggybyte-technology/egg →
🔮

yao-oracle

Oracle database integration and management tools for modern Go applications.

github.com/eggybyte-technology/yao-oracle →
⛓️

EggyByte Chain

Blockchain infrastructure for decentralized applications and smart contracts.

chain.eggybyte.com →
📦

Helm Charts

Kubernetes deployment charts for easy service orchestration and management.

charts.eggybyte.com →
📚

Documentation

Comprehensive guides, API references, and best practices for all EggyByte projects.

docs.eggybyte.com →
🐙

GitHub Organization

Open source projects, contributions welcome. Join our growing developer community.

github.com/eggybyte-technology →

About EggyByte Technology

Leading innovations in AI and Web3 technologies

🚀 Our Mission

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.

🌐 Areas of Innovation

  • 🤖 AI Models & Applications: Advanced machine learning solutions for enterprise clients
  • ⛓️ Web3 & Blockchain: EggyByte Chain and decentralized infrastructure
  • 💻 Developer Tools: Open-source frameworks and cloud-native solutions

🌟 Open Source Commitment

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