1 Star 0 Fork 0

John / kratos

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

kratos

Language Build Status GoDoc Go Report Card Discord

Kratos

Kratos是bilibili开源的一套Go微服务框架,包含大量微服务相关框架及工具。

名字来源于:《战神》游戏以希腊神话为背景,讲述由凡人成为战神的奎托斯(Kratos)成为战神并展开弑神屠杀的冒险历程。

Goals

我们致力于提供完整的微服务研发体验,整合相关框架及工具后,微服务治理相关部分可对整体业务开发周期无感,从而更加聚焦于业务交付。对每位开发者而言,整套Kratos框架也是不错的学习仓库,可以了解和参考到bilibili在微服务方面的技术积累和经验。

Features

  • HTTP Blademaster:核心基于gin进行模块化设计,简单易用、核心足够轻量;
  • GRPC Warden:基于官方gRPC开发,集成discovery服务发现,并融合P2C负载均衡;
  • Cache:优雅的接口化设计,非常方便的缓存序列化,推荐结合代理模式overlord
  • Database:集成MySQL/HBase/TiDB,添加熔断保护和统计支持,可快速发现数据层压力;
  • Config:方便易用的paladin sdk,可配合远程配置中心,实现配置版本管理和更新;
  • Log:类似zap的field实现高性能日志库,并结合log-agent实现远程日志管理;
  • Trace:基于opentracing,集成了全链路trace支持(gRPC/HTTP/MySQL/Redis/Memcached);
  • Kratos Tool:工具链,可快速生成标准项目,或者通过Protobuf生成代码,非常便捷使用gRPC、HTTP、swagger文档;

Quick start

Requirments

Go version>=1.13

Installation

# Linux/macOS
GO111MODULE=on && go get -u github.com/go-kratos/kratos/tool/kratos

# Windows (Powershell)
go env -w GO111MODULE=on ; go get -u github.com/go-kratos/kratos/tool/kratos

# Windows (CMD)
go env -w GO111MODULE=on && go get -u github.com/go-kratos/kratos/tool/kratos

cd $GOPATH/src
kratos new kratos-demo

通过 kratos new 会快速生成基于kratos库的脚手架代码,如生成 kratos-demo

Build & Run

cd kratos-demo/cmd
go build
./cmd -conf ../configs

打开浏览器访问:http://localhost:8000/kratos-demo/start,你会看到输出了Golang 大法好 !!!

快速开始 kratos工具

Documentation

简体中文
简体中文(国内镜像)
FAQ

License

Kratos is under the MIT license. See the LICENSE file for details.


Please report bugs, concerns, suggestions by issues, on Discord Group or join QQ-group 716486124 to discuss problems around source code.

MIT License Copyright (c) 2018 bilibili Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/johng/kratos.git
git@gitee.com:johng/kratos.git
johng
kratos
kratos
master

搜索帮助