Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 调整 HostService host.HostService ServerService server.ServerService //需要开启的服务 SupportedServices []AppService // 维护服务列表 ImplApps = map[string]ImplService{} )
HttpService gin
type HttpService interface {
Name() string
Registry(r gin.IRouter) //注册路由
}
Functions ¶
func RegistryImpl ¶
func RegistryImpl(obj ImplService)
RegistryImpl 传入一个实现过初始化和命名的东西, 第一次判断这个obj是否实现了Config和Name
Types ¶
type AppService ¶
type AppService interface {
ServiceName() string
}
type AppServices ¶
type AppServices struct {
}
type ImplService ¶
type ImplService interface {
Config()
Name() string
}
ImplService IOC 容器层 管理所有服务的实例
Click to show internal directories.
Click to hide internal directories.