Skip to content

监听变更事件

Joe Zou edited this page Sep 16, 2020 · 5 revisions

使用监听器

type CustomChangeListener struct {
	
}

func (c *CustomChangeListener) OnChange(changeEvent *agollo.ChangeEvent) {
   //write your code here
}

func main(){
   client,err:=agollo.Start()
	client.AddChangeListener(c2)
}

更多使用:https://github.com/zouyx/agollo_demo/tree/master/custom/listener