github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/topology/full.go (about)

     1  package topology
     2  
     3  import (
     4  	"github.com/onflow/flow-go/model/flow"
     5  	"github.com/onflow/flow-go/network"
     6  )
     7  
     8  // FullyConnectedTopology returns all nodes as the fanout.
     9  type FullyConnectedTopology struct{}
    10  
    11  var _ network.Topology = &FullyConnectedTopology{}
    12  
    13  func NewFullyConnectedTopology() network.Topology {
    14  	return &FullyConnectedTopology{}
    15  }
    16  
    17  func (f FullyConnectedTopology) Fanout(ids flow.IdentityList) flow.IdentityList {
    18  	return ids
    19  }