Documentation ¶
Index ¶
Constants ¶
View Source
const ( Create = "Create" Remove = "Remove" Modify = "Modify" Unknown = "Unknown" )
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(dir string, profile UserProfile) error
Register 函数注册配置文件到观察列表中,每次配置文件发送变动时,通知profile进行更新
Types ¶
type UserProfile ¶
UserProfile 为用户配置结构的接口,当以函数Name的返回值为名称的配置文件被创建或者修改时, Modify函数会被调用,触发配置结构内容的更改 Modify函数必须有事务支持,即当Modify函数返回error时,配置结构的内容不应被改变 TODO 是否应该支持Name会动态变化的?
Click to show internal directories.
Click to hide internal directories.