commit
d2274d9b06
@ -0,0 +1,21 @@ |
||||
# 安装失败,提示go mod 错误 |
||||
|
||||
执行 |
||||
```shell |
||||
go get -u github.com/bilibili/kratos/tool/kratos |
||||
``` |
||||
出现以下错误时 |
||||
```shell |
||||
go: github.com/prometheus/client_model@v0.0.0-20190220174349-fd36f4220a90: parsing go.mod: missing module line |
||||
go: github.com/remyoudompheng/bigfft@v0.0.0-20190806203942-babf20351dd7e3ac320adedbbe5eb311aec8763c: parsing go.mod: missing module line |
||||
``` |
||||
如果你使用了https://goproxy.io/ 代理,那你要使用其他代理来替换它,然后删除GOPATH目录下的mod缓存文件夹,然后重新执行安装命令 |
||||
|
||||
代理列表 |
||||
|
||||
``` |
||||
export GOPROXY=https://mirrors.aliyun.com/goproxy/ |
||||
export GOPROXY=https://goproxy.cn/ |
||||
export GOPROXY=https://goproxy.io/ |
||||
``` |
||||
|
@ -0,0 +1,69 @@ |
||||
# 安装 |
||||
|
||||
1.安装protoc二进制文件 |
||||
|
||||
``` |
||||
下载地址:https://github.com/google/protobuf/releases |
||||
mv bin/protoc /usr/local/bin/ |
||||
mv -r include/google /usr/local/include/ |
||||
``` |
||||
|
||||
2.安装protobuf库文件 |
||||
|
||||
``` |
||||
go get -u github.com/golang/protobuf/proto |
||||
``` |
||||
|
||||
3.安装goprotobuf插件 |
||||
|
||||
``` |
||||
go get github.com/golang/protobuf/protoc-gen-go |
||||
``` |
||||
|
||||
4.安装gogoprotobuf插件和依赖 |
||||
|
||||
``` |
||||
//gogo |
||||
go get github.com/gogo/protobuf/protoc-gen-gogo |
||||
|
||||
//gofast |
||||
go get github.com/gogo/protobuf/protoc-gen-gofast |
||||
|
||||
//依赖 |
||||
go get github.com/gogo/protobuf/proto |
||||
go get github.com/gogo/protobuf/gogoproto |
||||
``` |
||||
|
||||
5.安装框架依赖 |
||||
|
||||
``` |
||||
# grpc (或者git clone https://github.com/grpc/grpc-go 然后复制到google.golang.org/grpc) |
||||
go get -u google.golang.org/grpc |
||||
|
||||
# genproto (或者git clone https://github.com/google/go-genproto 然后复制到google.golang.org/genproto) |
||||
go get google.golang.org/genproto/... |
||||
``` |
||||
|
||||
6.安装kratos tool |
||||
|
||||
``` |
||||
go get -u github.com/bilibili/kratos/tool/kratos |
||||
cd $GOPATH/src |
||||
kratos new kratos-demo --proto |
||||
``` |
||||
|
||||
7.运行 |
||||
|
||||
``` |
||||
cd kratos-demo/cmd |
||||
go build |
||||
./cmd -conf ../configs |
||||
``` |
||||
|
||||
打开浏览器访问:[http://localhost:8000/kratos-demo/start](http://localhost:8000/kratos-demo/start),你会看到输出了`Golang 大法好 !!!` |
||||
|
||||
[kratos工具](kratos-tool.md) |
||||
|
||||
------------- |
||||
|
||||
[文档目录树](summary.md) |
@ -0,0 +1,15 @@ |
||||
#### dashboard |
||||
|
||||
> 监控模版,针对服务框架内的监控指标的UI展示。 |
||||
|
||||
##### Requirments |
||||
|
||||
- [Grafana](https://grafana.com) >= v6.1.4 |
||||
- [Prometheus](https://prometheus.io) >= 2.x |
||||
|
||||
##### Quick start |
||||
|
||||
1. 搭建grafana |
||||
2. 导入`prometheus.json`文件 |
||||
3. 修改对应的`Data source` |
||||
4. 保存 |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue