In my last post I introduced the architecture behind GoWind — the framework that carries 20+ enterprise products on a single Go stack: a core under 500 lines, 130+ plugins, and assembly by configuration instead of code.
This post is the hands-on follow-up. We're going to assemble the kind of service you'd actually ship — HTTP and gRPC transports, PostgreSQL, Redis, MinIO, Kafka, distributed tracing, and service discovery in etcd — and almost all of it will be one YAML file .
A gRPC microservice with service discovery
Start with a service that registers itself in etcd:
app : name : user-service
server : grpc : addr : ":9000" reflection : true middleware : recovery : { } logging : { } validate : { }
registry : type : etcd etcd : endpoints : [ "localhost:2379" ] ttl : 30
database : sql : driver : mysql source : "user:pass@tcp(localhost:3306)/users?parseTime=true"
Enter fullscreen mode
Exit fullscreen mode
The main.go only registers the gRPC service implementation and starts:
package main
import (…