Esempio n. 1
0
func serviceGone(client *eventual2go.StreamController) eventual2go.Subscriber {
	return func(d eventual2go.Data) {
		s := d.(service.ServiceGone)
		if !client.Closed().Completed() {
			client.Add(NewServiceGone(s))
		}
	}
}
Esempio n. 2
0
func collectResponse(iface string, resp *serf.QueryResponse, s *eventual2go.StreamController, wg *sync.WaitGroup) {
	for r := range resp.ResponseCh() {
		s.Add(QueryResponseEvent{iface, r})
	}
	wg.Done()
}
Esempio n. 3
0
func serviceGone(client *eventual2go.StreamController) eventual2go.Subscriber {
	return func(d eventual2go.Data) {
		uuid := d.(string)
		client.Add(NewServiceGone(uuid))
	}
}
Esempio n. 4
0
func serviceArrived(client *eventual2go.StreamController) eventual2go.Subscriber {
	return func(d eventual2go.Data) {
		sa := d.(service.ServiceArrived)
		client.Add(NewServiceArrived(sa))
	}
}