Esempio n. 1
0
func (f *getPeersFuture) GetResult() (interface{}, error) {
	if err := app.ResolveFutureError(f.errorChannel); err != nil {
		return nil, err
	}

	peers := make([]*Peer, 0)

	for peer := range f.resultChannel {
		peers = append(peers, peer)
	}

	return peers, nil
}
Esempio n. 2
0
func (r *removePeerFuture) GetResult() (interface{}, error) {
	return nil, app.ResolveFutureError(r.resultChannel)
}
Esempio n. 3
0
func (f *insertPeerFuture) GetResult() (interface{}, error) {
	return nil, app.ResolveFutureError(f.resultChannel)
}