Documentation ¶
Index ¶
- Variables
- func GetAddr(sv string) string
- func GetPortMust(sv string) int
- func GrpcHttpHandleFunc(grpcServer any) http.HandlerFunc
- func HttpReturn(w http.ResponseWriter, value interface{})
- func Init(serviceName string)
- func MakeMsg(value any, override map[string]any) []byte
- func MakeRouteMsg(value any, route any) []byte
- func NewGrpcClient[T any](name string, fn func(cc grpc.ClientConnInterface) T) (ret T)
- func Serve()
- func ServeFn(fn func())
- func SetClientCodec(name string, codec grpc.DialOption)
- func StartGrpcTestHttpServer(addr string, grpcServer any)
- func WrapMsg(value any) map[string]any
- type HttpContext
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BUILD_TIME = "" GO_VERSION = "" AUTHOR = "" )
View Source
var ConfigManager *cfgmgr.ConfigManager
View Source
var GrpcClient *rpc1.ClientManager
View Source
var GrpcServer *rpc1.Server
View Source
var PortProvider discovery.PortProvider
View Source
var ServiceDiscovery discovery.Discovery
View Source
var ServiceName string
View Source
var ServiceRegister discovery.Register
Functions ¶
func GetPortMust ¶
func GrpcHttpHandleFunc ¶
func GrpcHttpHandleFunc(grpcServer any) http.HandlerFunc
func HttpReturn ¶
func HttpReturn(w http.ResponseWriter, value interface{})
func MakeRouteMsg ¶
func NewGrpcClient ¶
func NewGrpcClient[T any](name string, fn func(cc grpc.ClientConnInterface) T) (ret T)
创建并连接Grpc服务
func SetClientCodec ¶
func SetClientCodec(name string, codec grpc.DialOption)
func StartGrpcTestHttpServer ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.