github.com/koko1123/flow-go-1@v0.29.6/network/topology.go (about)

     1  package network
     2  
     3  import (
     4  	"github.com/koko1123/flow-go-1/model/flow"
     5  )
     6  
     7  // Topology provides a subset of nodes which a given node should directly connect in order to form a connected mesh
     8  // for epidemic message dissemination (e.g., publisher and subscriber model).
     9  type Topology interface {
    10  	// Fanout receives IdentityList of entire network and constructs the fanout IdentityList of the node.
    11  	// A node directly communicates with its fanout IdentityList on epidemic dissemination
    12  	// of the messages (i.e., publish and multicast).
    13  	//
    14  	// Fanout is not concurrency safe. It is responsibility of caller to lock for it (if needed).
    15  	Fanout(ids flow.IdentityList) flow.IdentityList
    16  }