Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 40 Service, 怎么办? 写40个定义, // 使用Interface{} + 断言进行抽象 HostService host.Service )
Functions ¶
func RegistryGin ¶
func RegistryGin(svc GinService)
func RegistryImpl ¶
func RegistryImpl(svc ImplService)
Types ¶
type GinService ¶
注册有gin编写的handler 如果编写了http服务A,只要实现了Registry方法,就能把Handler注册给root Router
type ImplService ¶
type ImplService interface { Config() Name() string }
Click to show internal directories.
Click to hide internal directories.