1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-24 03:46:37 +02:00
Mikado 1b16831cf6
adjust trace middleware and fix blog's trace middleware use case (#791)
* middleware: adjust trace middleware

* examples: fix blog's trace middleware use case
2021-03-18 20:10:43 +08:00
..
2021-03-11 23:42:28 +08:00
2021-03-05 23:49:25 +08:00
2021-03-05 23:49:25 +08:00
2021-03-11 23:42:28 +08:00
2021-03-05 23:49:25 +08:00
2021-03-11 23:42:28 +08:00
2021-03-05 23:49:25 +08:00

Kratos Layout

Install Kratos

go get github.com/go-kratos/kratos/cmd/kratos
go get github.com/go-kratos/kratos/cmd/protoc-gen-go-http
go get github.com/go-kratos/kratos/cmd/protoc-gen-go-errors

# from source
cd cmd/kratos && go install
cd cmd/protoc-gen-go-http && go install
cd cmd/protoc-gen-go-errors && go install

Create a service

# create a template project
kratos new helloworld

cd helloworld
# Add a proto template
kratos proto add api/helloworld/helloworld.proto
# Generate the source code of service by proto file
kratos proto service api/helloworld/helloworld.proto -t internal/service

make proto
make build
make test