Exemplo 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)
}
Exemplo 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)
}