Esempio n. 1
0
func (this *SQLServer) AddObserver(observer Observer) {
	this.obsevers = append(this.obsevers, observer)

	zkm.AddObserver(zkm.MakeDatabaseGroup(DB_DRIVER_POSTGRES, observer.Group()), this)

	//request when register
	this.requestDatabaseList(observer)
}
Esempio n. 2
0
func (this *SQLServer) AddObserver(observer Observer) {
	this.obsevers = append(this.obsevers, observer)

	zkm.AddObserver(zkm.Database.MakeDatabaseGroup(DB_DRIVER_POSTGRES, observer.Group()), this)

	//request when register
	this.requestDatabaseList(observer)

	//add self
	observer.OnUpdateDatabaseList(this.master, this.slaves)
}