[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-4781":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":15,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":24,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},4781,"go-micro","micro\u002Fgo-micro","micro","A Go framework for services and agents","https:\u002F\u002Fgo-micro.dev",null,"Go",22769,2405,493,1,0,13,27,9,45,"Apache License 2.0",false,"master",true,[26,27,28,7,29,30],"distributed-systems","go","golang","microservices","rpc","2026-06-12 02:01:03","# Go Micro [![Go.Dev reference](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fgo.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https:\u002F\u002Fpkg.go.dev\u002Fgo-micro.dev\u002Fv5?tab=doc) [![Go Report Card](https:\u002F\u002Fgoreportcard.com\u002Fbadge\u002Fgithub.com\u002Fgo-micro\u002Fgo-micro)](https:\u002F\u002Fgoreportcard.com\u002Freport\u002Fgithub.com\u002Fgo-micro\u002Fgo-micro) \n\nGo Micro is a framework for distributed systems development.\n\n**[📖 Documentation](https:\u002F\u002Fgo-micro.dev\u002Fdocs\u002F)** | [Sponsored by Anthropic](https:\u002F\u002Fgo-micro.dev\u002Fblog\u002F3)\n\n*️⃣ Try [Mu.xyz](https:\u002F\u002Fmu.xyz) - a new app platform by the creator of Go Micro\n\n## Overview\n\nGo Micro provides the core requirements for distributed systems development including RPC and Event driven communication.\nThe Go Micro philosophy is sane defaults with a pluggable architecture. We provide defaults to get you started quickly\nbut everything can be easily swapped out.\n\n## Features\n\nGo Micro abstracts away the details of distributed systems. Here are the main features.\n\n- **Authentication** - Auth is built in as a first class citizen. Authentication and authorization enable secure\n  zero trust networking by providing every service an identity and certificates. This additionally includes rule\n  based access control.\n\n- **Dynamic Config** - Load and hot reload dynamic config from anywhere. The config interface provides a way to load application\n  level config from any source such as env vars, file, etcd. You can merge the sources and even define fallbacks.\n\n- **Data Storage** - A simple data store interface to read, write and delete records. It includes support for many storage backends\nin the plugins repo. State and persistence becomes a core requirement beyond prototyping and Micro looks to build that into the framework.\n\n- **Data Model** - A typed data model layer with CRUD operations, queries, and multiple backends (memory, SQLite, Postgres). Define Go\n  structs with tags and get type-safe Create\u002FRead\u002FUpdate\u002FDelete\u002FList\u002FCount operations. Accessible via `service.Model()` alongside\n  `service.Client()` and `service.Server()` for a complete service experience: call services, handle requests, save and query data.\n\n- **Service Discovery** - Automatic service registration and name resolution. Service discovery is at the core of micro service\n  development. When service A needs to speak to service B it needs the location of that service. The default discovery mechanism is\n  multicast DNS (mdns), a zeroconf system.\n\n- **Load Balancing** - Client side load balancing built on service discovery. Once we have the addresses of any number of instances\n  of a service we now need a way to decide which node to route to. We use random hashed load balancing to provide even distribution\n  across the services and retry a different node if there's a problem.\n\n- **Message Encoding** - Dynamic message encoding based on content-type. The client and server will use codecs along with content-type\n  to seamlessly encode and decode Go types for you. Any variety of messages could be encoded and sent from different clients. The client\n  and server handle this by default. This includes protobuf and json by default.\n\n- **RPC Client\u002FServer** - RPC based request\u002Fresponse with support for bidirectional streaming. We provide an abstraction for synchronous\n  communication. A request made to a service will be automatically resolved, load balanced, dialled and streamed.\n\n- **Async Messaging** - PubSub is built in as a first class citizen for asynchronous communication and event driven architectures.\n  Event notifications are a core pattern in micro service development. The default messaging system is a HTTP event message broker.\n\n- **MCP Integration** - An MCP gateway you can integrate as a library, server or CLI command which automatically exposes services\n  as tools for agents or other AI applications. Every service\u002Fendpoint get's converted into a callable tool.\n\n- **Multi-Service Binaries** - Run multiple services in a single process with isolated state per service. Start as a modular monolith,\n  split into separate deployments when you need independent scaling. Each service gets its own server, client, and store while sharing\n  the registry and broker for inter-service communication.\n\n- **Pluggable Interfaces** - Go Micro makes use of Go interfaces for each distributed system abstraction. Because of this these interfaces\n  are pluggable and allows Go Micro to be runtime agnostic. You can plugin any underlying technology.\n\n## Getting Started\n\nTo make use of Go Micro \n\n```bash\ngo get go-micro.dev\u002Fv5@v5.16.0\n```\n\nCreate a service and register a handler\n\n```go\npackage main\n\nimport (\n        \"go-micro.dev\u002Fv5\"\n)\n\ntype Request struct {\n        Name string `json:\"name\"`\n}\n\ntype Response struct {\n        Message string `json:\"message\"`\n}\n\ntype Say struct{}\n\nfunc (h *Say) Hello(ctx context.Context, req *Request, rsp *Response) error {\n        rsp.Message = \"Hello \" + req.Name\n        return nil\n}\n\nfunc main() {\n        \u002F\u002F create the service\n        service := micro.New(\"helloworld\")\n\n        \u002F\u002F register handler\n        service.Handle(new(Say))\n\n        \u002F\u002F run the service\n        service.Run()\n}\n```\n\nSet a fixed address\n\n```go\nservice := micro.New(\"helloworld\", micro.Address(\":8080\"))\n```\n\nCall it via curl\n\n```bash\ncurl -XPOST \\\n     -H 'Content-Type: application\u002Fjson' \\\n     -H 'Micro-Endpoint: Say.Hello' \\\n     -d '{\"name\": \"alice\"}' \\\n      http:\u002F\u002Flocalhost:8080\n```\n\n## MCP & AI Agents\n\nGo Micro is designed for an **agent-first** workflow. Every service you build automatically becomes a tool that AI agents can discover and use via the [Model Context Protocol (MCP)](https:\u002F\u002Fmodelcontextprotocol.io\u002F).\n\n- **[🤖 Agent Playground](https:\u002F\u002Fgo-micro.dev\u002Fdocs\u002Fmcp.html)** — Chat with your services through an interactive AI agent at `\u002Fagent`\n- **[🔧 MCP Tools Registry](https:\u002F\u002Fgo-micro.dev\u002Fdocs\u002Fmcp.html)** — Browse all services exposed as AI-callable tools at `\u002Fapi\u002Fmcp\u002Ftools`\n- **[📖 MCP Documentation](https:\u002F\u002Fgo-micro.dev\u002Fdocs\u002Fmcp.html)** — Full guide to MCP integration, auth, and scopes\n\n### Services as Tools\n\nWrite a normal Go Micro service and it's instantly available as an MCP tool:\n\n```go\n\u002F\u002F SayHello greets a person by name.\n\u002F\u002F @example {\"name\": \"Alice\"}\nfunc (g *GreeterService) SayHello(ctx context.Context, req *HelloRequest, rsp *HelloResponse) error {\n    rsp.Message = \"Hello \" + req.Name\n    return nil\n}\n```\n\nRun with `micro run` and the agent playground and MCP tools registry are ready:\n\n```bash\nmicro run\n# Agent Playground:  http:\u002F\u002Flocalhost:8080\u002Fagent\n# MCP Tools:         http:\u002F\u002Flocalhost:8080\u002Fapi\u002Fmcp\u002Ftools\n```\n\nUse `micro mcp serve` for local AI tools like Claude Code, or connect any MCP-compatible agent to the HTTP endpoint.\n\nSee the [MCP guide](https:\u002F\u002Fgo-micro.dev\u002Fdocs\u002Fmcp.html) for authentication, scopes, and advanced usage.\n\n## Multi-Service Binaries\n\nRun multiple services in a single binary — start as a modular monolith, split into separate deployments later when you actually need to.\n\n```go\nusers := micro.New(\"users\", micro.Address(\":9001\"))\norders := micro.New(\"orders\", micro.Address(\":9002\"))\n\nusers.Handle(new(Users))\norders.Handle(new(Orders))\n\n\u002F\u002F Run all services together with shared lifecycle\ng := micro.NewGroup(users, orders)\ng.Run()\n```\n\nEach service gets its own server, client, store, and cache while sharing the registry, broker, and transport — so they can discover and call each other within the same process.\n\nSee the [multi-service example](examples\u002Fmulti-service\u002F) for a working demo.\n\n## Data Model\n\nGo Micro includes a typed data model layer for persistence. Define a struct, tag a key field, and get type-safe CRUD and query operations backed by memory, SQLite, or Postgres.\n\n```go\nimport (\n        \"go-micro.dev\u002Fv5\u002Fmodel\"\n        \"go-micro.dev\u002Fv5\u002Fmodel\u002Fsqlite\"\n)\n\n\u002F\u002F Define your data type\ntype User struct {\n        ID    string `json:\"id\" model:\"key\"`\n        Name  string `json:\"name\"`\n        Email string `json:\"email\" model:\"index\"`\n        Age   int    `json:\"age\"`\n}\n```\n\nRegister your types and use the model:\n\n```go\nservice := micro.New(\"users\")\n\n\u002F\u002F Register and use the service's model backend\ndb := service.Model()\ndb.Register(&User{})\n\n\u002F\u002F CRUD operations\ndb.Create(ctx, &User{ID: \"1\", Name: \"Alice\", Email: \"alice@example.com\", Age: 30})\n\nuser := &User{}\ndb.Read(ctx, \"1\", user)\n\nuser.Name = \"Alice Smith\"\ndb.Update(ctx, user)\n\ndb.Delete(ctx, \"1\", &User{})\n```\n\nQuery with filters, ordering, and pagination:\n\n```go\nvar results []*User\n\n\u002F\u002F Find users by field\ndb.List(ctx, &results, model.Where(\"email\", \"alice@example.com\"))\n\n\u002F\u002F Complex queries\ndb.List(ctx, &results,\n        model.WhereOp(\"age\", \">=\", 18),\n        model.OrderDesc(\"name\"),\n        model.Limit(10),\n        model.Offset(20),\n)\n\ncount, _ := users.Count(ctx, model.Where(\"age\", 30))\n```\n\nSwap backends with an option:\n\n```go\n\u002F\u002F Development: in-memory (default)\nservice := micro.New(\"users\")\n\n\u002F\u002F Production: SQLite or Postgres\ndb, _ := sqlite.New(model.WithDSN(\"file:app.db\"))\nservice := micro.New(\"users\", micro.Model(db))\n```\n\nEvery service gets `Client()`, `Server()`, and `Model()` — call services, handle requests, and save data all from the same interface.\n\n## Examples\n\nCheck out [\u002Fexamples](examples\u002F) for runnable code:\n- [hello-world](examples\u002Fhello-world\u002F) - Basic RPC service\n- [web-service](examples\u002Fweb-service\u002F) - HTTP REST API\n- [multi-service](examples\u002Fmulti-service\u002F) - Multiple services in one binary\n- [mcp](examples\u002Fmcp\u002F) - MCP integration with AI agents\n\nSee [all examples](examples\u002FREADME.md) for more.\n\n## Protobuf\n\nInstall the code generator and see usage in the docs:\n\n```bash\ngo install go-micro.dev\u002Fv5\u002Fcmd\u002Fprotoc-gen-micro@v5.16.0\n```\n\n> **Note:** Use a specific version instead of `@latest` to avoid module path conflicts. See [releases](https:\u002F\u002Fgithub.com\u002Fmicro\u002Fgo-micro\u002Freleases) for the latest version.\n\nDocs: [`internal\u002Fwebsite\u002Fdocs\u002Fgetting-started.md`](internal\u002Fwebsite\u002Fdocs\u002Fgetting-started.md)\n\n## Command Line\n\nInstall the CLI:\n\n```\ngo install go-micro.dev\u002Fv5\u002Fcmd\u002Fmicro@v5.16.0\n```\n\n> **Note:** Use a specific version instead of `@latest` to avoid module path conflicts. See [releases](https:\u002F\u002Fgithub.com\u002Fmicro\u002Fgo-micro\u002Freleases) for the latest version.\n\n### Quick Start\n\n```bash\nmicro new helloworld   # Create a new service\ncd helloworld\nmicro run              # Run with API gateway and hot reload\n```\n\nThen open http:\u002F\u002Flocalhost:8080 to see your service and call it from the browser.\n\n### Development Workflow\n\n| Stage | Command | Purpose |\n|-------|---------|---------|\n| **Develop** | `micro run` | Local dev with hot reload and API gateway |\n| **Build** | `micro build` | Compile production binaries |\n| **Deploy** | `micro deploy` | Push to a remote Linux server via SSH + systemd |\n| **Dashboard** | `micro server` | Optional production web UI with JWT auth |\n\n### micro run\n\n`micro run` starts your services with:\n- **Web Dashboard** - Browse and call services at `\u002F`\n- **Agent Playground** - AI chat with MCP tools at `\u002Fagent`\n- **API Explorer** - Browse endpoints and schemas at `\u002Fapi`\n- **API Gateway** - HTTP to RPC proxy at `\u002Fapi\u002F{service}\u002F{method}` (no auth in dev mode)\n- **MCP Tools** - Services as AI tools at `\u002Fapi\u002Fmcp\u002Ftools`\n- **Health Checks** - Aggregated health at `\u002Fhealth`\n- **Hot Reload** - Auto-rebuild on file changes\n\n> **Note:** `micro run` and `micro server` use a unified gateway architecture. See [Gateway Architecture](cmd\u002Fmicro\u002FREADME.md#gateway-architecture) for details.\n\n```bash\nmicro run                    # Gateway on :8080\nmicro run --address :3000    # Custom gateway port\nmicro run --no-gateway       # Services only\nmicro run --env production   # Use production environment\n```\n\n### Configuration\n\nFor multi-service projects, create a `micro.mu` file:\n\n```\nservice users\n    path .\u002Fusers\n    port 8081\n\nservice posts\n    path .\u002Fposts\n    port 8082\n    depends users\n\nenv development\n    DATABASE_URL sqlite:\u002F\u002F.\u002Fdev.db\n```\n\nThe gateway runs on :8080 by default, so services should use other ports.\n\n### Deployment\n\nDeploy to any Linux server with systemd:\n\n```bash\n# On your server (one-time setup)\ncurl -fsSL https:\u002F\u002Fgo-micro.dev\u002Finstall.sh | sh\nsudo micro init --server\n\n# From your laptop\nmicro deploy user@your-server\n```\n\nThe deploy command:\n1. Builds binaries for Linux\n2. Copies via SSH to the server\n3. Sets up systemd services\n4. Verifies services are healthy\n\nOptionally run `micro server` on the deployed machine for a production web dashboard with JWT auth, user management, and API explorer.\n\nManage deployed services:\n```bash\nmicro status --remote user@server    # Check status\nmicro logs --remote user@server      # View logs\nmicro logs myservice --remote user@server -f  # Follow specific service\n```\n\nNo Docker required. No Kubernetes. Just systemd.\n\nSee [internal\u002Fwebsite\u002Fdocs\u002Fdeployment.md](internal\u002Fwebsite\u002Fdocs\u002Fdeployment.md) for full deployment guide.\n\nSee [cmd\u002Fmicro\u002FREADME.md](cmd\u002Fmicro\u002FREADME.md) for full CLI documentation.\n\nDocs: [`internal\u002Fwebsite\u002Fdocs`](internal\u002Fwebsite\u002Fdocs)\n\nPackage reference: https:\u002F\u002Fpkg.go.dev\u002Fgo-micro.dev\u002Fv5\n\n**User Guides:**\n- [Getting Started](internal\u002Fwebsite\u002Fdocs\u002Fgetting-started.md)\n- [Data Model](internal\u002Fwebsite\u002Fdocs\u002Fmodel.md)\n- [MCP & AI Agents](internal\u002Fwebsite\u002Fdocs\u002Fmcp.md)\n- [Plugins Overview](internal\u002Fwebsite\u002Fdocs\u002Fplugins.md)\n- [Learn by Example](internal\u002Fwebsite\u002Fdocs\u002Fexamples\u002Findex.md)\n- [Deployment Guide](internal\u002Fwebsite\u002Fdocs\u002Fdeployment.md)\n\n**Architecture & Performance:**\n- [Performance Considerations](internal\u002Fwebsite\u002Fdocs\u002Fperformance.md)\n- [Reflection Usage & Philosophy](internal\u002Fwebsite\u002Fdocs\u002FREFLECTION-EVALUATION-SUMMARY.md)\n\n**Security:**\n- [TLS Security Migration](internal\u002Fwebsite\u002Fdocs\u002FTLS_SECURITY_UPDATE.md)\n- [Security Migration Guide](internal\u002Fwebsite\u002Fdocs\u002FSECURITY_MIGRATION.md)\n\n## Adopters\n\n- [Sourse](https:\u002F\u002Fsourse.eu) - Work in the field of earth observation, including embedded Kubernetes running onboard aircraft, and we’ve built a mission management SaaS platform using Go Micro.\n","Go Micro 是一个用于开发分布式系统的 Go 语言微服务框架。它提供了构建微服务所需的核心功能，包括 RPC 通信、事件驱动架构、服务发现和负载均衡等，同时支持插件化架构，允许开发者根据需求灵活替换组件。Go Micro 内置了认证机制以实现安全的服务间通信，并提供动态配置加载、数据存储抽象层以及类型化的数据模型接口等功能，简化了微服务应用的开发流程。适用于需要快速搭建可扩展且易于维护的微服务架构场景，特别适合对性能和灵活性有较高要求的企业级应用开发。",2,"2026-06-11 03:00:26","top_language"]