跳转到内容

The Go Framework for microservices

Kratos is a web application framework with expressive, elegant syntax. We've already laid the foundation.
func main() {
httpSrv := http.NewServer(
http.Address(":8000"),
)
grpcSrv := grpc.NewServer(
grpc.Address(":9000"),
)
v1.RegisterGreeterServer(srv, greeter)
v1.RegisterGreeterHTTPServer(srv, greeter)
app := kratos.New(
kratos.Name("kratos-app"),
kratos.Version("v1.0.0"),
kratos.Server(
httpSrv,
grpcSrv,
),
)
if err := app.Run(); err != nil {
log.Fatal(err)
}
}

Microservices

Build and deliver production-ready features fast with independently scalable and evolvable microservices architecture.

Specified API

Define consistent and type-safe interfaces using Protobuf, supporting both HTTP and gRPC communication out of the box.

Plug-able

Flexible middleware system supporting custom interceptors for logging, authentication, rate limiting, tracing, and more — enabling clean and reusable request pipelines.

Observability

Built-in tracing, metrics, and logging support help you gain full visibility into system performance and behavior.

Contribution

Thank you for contributing to the Kratos framework. Each contribution brings us one step closer to making Kratos even better.