gmsf

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 0 Imported by: 0

README

Grpc Hello World

go get -u github.com/spf13/cobra/cobra go get -u github.com/golang/protobuf/protoc-gen-go go get github.com/mitchellh/protoc-gen-go-json go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger

bug must add to go.mod

github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect

github.com/openzipkin-contrib/zipkin-go-opentracing v0.3.5

github.com/openzipkin/zipkin-go-opentracing v0.3.5

swagger相关

在项目下新建pkg/ui/data/swagger目录,回到$GOPATH/src/grpc-hello-world/third_party/swagger-ui下,执行命令

go-bindata --nocompress -pkg swagger -o pkg/ui/data/swagger/datafile.go third_party/swagger-ui/...

go-bindata 将Swagger UI转换为Go源代码

go get -u github.com/jteeuwen/go-bindata/...

go-bindata-assetfs 能够使用go-bindata所生成Swagger UI的Go代码,结合net/http对外提供服务

go get github.com/elazarl/go-bindata-assetfs/...

本项目提供Grpc+Grpc Gateway实践的示例代码

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
package cmd command line
package cmd command line
pkg
util
package util 通用工具
package util 通用工具
util/discovery
package discovery 注册和发现服务客户端
package discovery 注册和发现服务客户端
util/opentracer
package opentracer 日志追踪
package opentracer 日志追踪
proto
grpc_health_v1
Package grpc_health_v1 is a reverse proxy.
Package grpc_health_v1 is a reverse proxy.
package server 创建gRPC服务和网关服务并启动服务器
package server 创建gRPC服务和网关服务并启动服务器
package service 框架启动的各种服务
package service 框架启动的各种服务

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL