github.com/anacrolix/torrent@v1.61.0/tracker/server/upstream-announcing.go (about) 1 package trackerServer 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 }