Commit 339dafdc authored by Petar Radovic's avatar Petar Radovic

hive peer suggester, saturation tracker

parent 2b6cbf1b
...@@ -22,6 +22,8 @@ const ( ...@@ -22,6 +22,8 @@ const (
type Service struct { type Service struct {
streamer p2p.Streamer streamer p2p.Streamer
logger logging.Logger logger logging.Logger
peerSuggester PeerSuggester
saturationTracker SaturationTracker
tickInterval time.Duration tickInterval time.Duration
done chan struct{} done chan struct{}
...@@ -31,6 +33,8 @@ type Service struct { ...@@ -31,6 +33,8 @@ type Service struct {
type Options struct { type Options struct {
Streamer p2p.Streamer Streamer p2p.Streamer
Logger logging.Logger Logger logging.Logger
PeerSuggester PeerSuggester
SaturationTracker SaturationTracker
TickInterval time.Duration TickInterval time.Duration
} }
...@@ -49,6 +53,8 @@ func New(o Options) *Service { ...@@ -49,6 +53,8 @@ func New(o Options) *Service {
streamer: o.Streamer, streamer: o.Streamer,
logger: o.Logger, logger: o.Logger,
tickInterval: o.TickInterval, tickInterval: o.TickInterval,
peerSuggester: o.PeerSuggester,
saturationTracker: o.SaturationTracker,
done: make(chan struct{}), done: make(chan struct{}),
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment