Exemple #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
}
Exemple #2
0
func (r *removePeerFuture) GetResult() (interface{}, error) {
	return nil, app.ResolveFutureError(r.resultChannel)
}
Exemple #3
0
func (f *insertPeerFuture) GetResult() (interface{}, error) {
	return nil, app.ResolveFutureError(f.resultChannel)
}