seedPeer contains content for seed peer.
| 82 | |
| 83 | // seedPeer contains content for seed peer. |
| 84 | type seedPeer struct { |
| 85 | // peerManager is PeerManager interface. |
| 86 | peerManager PeerManager |
| 87 | |
| 88 | // hostManager is HostManager interface. |
| 89 | hostManager HostManager |
| 90 | |
| 91 | // clientPool is Pool interface. |
| 92 | clientPool dfdaemonclient.Pool |
| 93 | |
| 94 | // dialOpts is the options for grpc dial. |
| 95 | dialOptions []grpc.DialOption |
| 96 | |
| 97 | // hosts is the list of seed peers. |
| 98 | hosts *sync.Map |
| 99 | |
| 100 | // hashring is the hashring constructed from seed peers. |
| 101 | hashring *consistent.Consistent |
| 102 | |
| 103 | // done is the channel to stop the seed peer service. |
| 104 | done chan struct{} |
| 105 | } |
| 106 | |
| 107 | // New SeedPeer interface. |
| 108 | func newSeedPeer(peerManager PeerManager, hostManager HostManager, clientPool dfdaemonclient.Pool, dialOptions ...grpc.DialOption) SeedPeer { |
nothing calls this directly
no outgoing calls
no test coverage detected