MCPcopy
hub / github.com/dragonflyoss/dragonfly / seedPeer

Struct seedPeer

scheduler/resource/standard/seed_peer.go:84–105  ·  view source on GitHub ↗

seedPeer contains content for seed peer.

Source from the content-addressed store, hash-verified

82
83// seedPeer contains content for seed peer.
84type 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.
108func newSeedPeer(peerManager PeerManager, hostManager HostManager, clientPool dfdaemonclient.Pool, dialOptions ...grpc.DialOption) SeedPeer {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected