github.com/anacrolix/torrent@v1.61.0/torrent-regular-tracker-announcer.go (about)

     1  package torrent
     2  
     3  import (
     4  	"net/url"
     5  )
     6  
     7  // A handle to announcer status and actions for a Torrent.
     8  type torrentRegularTrackerAnnouncer struct {
     9  	u                *url.URL
    10  	getAnnounceState func() announceState
    11  }
    12  
    13  var _ torrentTrackerAnnouncer = torrentRegularTrackerAnnouncer{}
    14  
    15  func (r torrentRegularTrackerAnnouncer) statusLine() string {
    16  	return regularTrackerScraperStatusLine(r.getAnnounceState())
    17  }
    18  
    19  func (r torrentRegularTrackerAnnouncer) URL() *url.URL {
    20  	return r.u
    21  }
    22  
    23  func (r torrentRegularTrackerAnnouncer) Stop() {
    24  	// Currently the client-level announcer will just see it was dropped when looking for work.
    25  }