Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
HostService host.Service
)
1. HostService的实例必须注册过来,不然HostService就是一个nil,在服务启动的时候注册 2. HTTP暴露模块,依赖IOC中的HostService
Functions ¶
func GetImpl ¶
func GetImpl(name string) interface{}
根据名称,返回一个对象,任何类型都可以,具体的使用由使用方通过断言的方式进行判断和使用 从implApps中去获取这个指定名称的对象
func RegistryGin ¶
func RegistryGin(svc GinService)
func RegistryImpl ¶
func RegistryImpl(svc ImplService)
Types ¶
type GinService ¶
注册由Gin编写的Http Handler 比如实现了HTTP A,只需要实现Registry()方法,就能把Handler注册给Root Handler
type ImplService ¶
type ImplService interface { Config() Name() string }
Click to show internal directories.
Click to hide internal directories.