XUtils

Kratos

A modular-designed and easy-to-use microservices framework in Go.


Learning Kratos

Kratos has the most extensive and thorough documentation and example library of all modern web application frameworks, making it a breeze to get started with the framework.

We also provide a modern template. This template should help reduce the work required to setup up modern projects.

Principles

  • Simple: Appropriate design with plain and easy code.
  • General: Cover the various utilities for business development.
  • Highly efficient: Speeding up the efficiency of businesses upgrading.
  • Stable: The base libs validated in the production environment have the characteristics of high testability, high coverage as well as high security and reliability.
  • Robust: Eliminating misusing through high quality of the base libs.
  • High-performance: Optimal performance excluding the optimization of hacking in case of unsafe
  • Expandability: Properly designed interfaces where you can expand utilities such as base libs to meet your further requirements.
  • Fault-tolerance: Designed against failure, enhance the understanding and exercising of SRE within Kratos to achieve more robustness.
  • Toolchain: Includes an extensive toolchain, such as the code generation of cache, the lint tool, and so forth.

Getting Started

Create a kratos playground through docker:

docker run -it --rm -p 8000:8000 --workdir /workspace golang
apt-get update && apt-get -y install protobuf-compiler
export GOPROXY=https://goproxy.io,direct
go install github.com/go-kratos/kratos/cmd/kratos/v2@latest && kratos upgrade
kratos new helloworld
cd helloworld/ && go mod tidy
kratos run

Use a browser to open and visit: http://localhost:8000/helloworld/kratos, The kratos program is running!

If you need more, please visit the kratos documentation.

Security Vulnerabilities

If you discover a security vulnerability within Kratos, please send an e-mail to tonybase via go-kratos@googlegroups.com. All security vulnerabilities will be promptly addressed.

Community

Acknowledgments

The following project had particular influence on kratos’s design.

  • go-kit/kit is a programming toolkit for building microservices in go.
  • asim/go-micro a distributed systems development framework.
  • google/go-cloud is go cloud development kit.
  • zeromicro/go-zero is a web and rpc framework with lots of builtin engineering practices.
  • beego/beego is a web framework including RESTful APIs, web apps and backend services.

Articles

  • coming soon...