Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultListenHandler ¶ added in v0.4.0
func DefaultListenHandler(config ConfigInterface)
func IsComponent ¶ added in v0.0.2
func IsComponent(instance interface{}) bool
Types ¶
type ComponentInterface ¶ added in v0.0.4
type ComponentInterface interface { Inject(instance any) bool // 注入容器实例 InjectConf(config ConfigInterface) bool // 注入组件配置 Load() // 初始化组件 Listen() []*ConfigListener // 监听配置 }
type ConfigInterface ¶ added in v0.4.0
type ConfigInterface interface {
ConfigName() string
}
type ConfigListener ¶ added in v0.4.0
type ConfigListener struct { ConfigName string Listeners []ListenHandler }
type ContainerInterface ¶ added in v0.4.0
type ListenHandler ¶ added in v0.4.0
type ListenHandler func(config ConfigInterface)
Click to show internal directories.
Click to hide internal directories.