]> Sergey Matveev's repositories - btrtrc.git/blob - tracker/upstream-announcing.go
Propagate announce interval, particularly for UDP
[btrtrc.git] / tracker / upstream-announcing.go
1 package tracker
2
3 import (
4         "context"
5         "time"
6 )
7
8 type UpstreamAnnounceGater interface {
9         Start(ctx context.Context, tracker string, infoHash InfoHash,
10         // How long the announce block remains before discarding it.
11                 timeout time.Duration,
12         ) (bool, error)
13         Completed(
14                 ctx context.Context, tracker string, infoHash InfoHash,
15         // Num of seconds reported by tracker, or some suitable value the caller has chosen.
16                 interval int32,
17         ) error
18 }