Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultAnnouncePath = "/announce"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*config) error
Option is a function that sets a value in a config.
func WithClient ¶
WithClient uses an existing http.Client with the Sender.
func WithTimeout ¶
WithTimeout configures the timeout to wait for a response.
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender sends announce messages over HTTP.
func New ¶
New creates a new Sender that sends announce messages over HTTP. Announce messages are sent to the specified URLs. The addresses in announce messages are modified to include the specified peerID, which is necessary to communicate the publisher ID over HTTP.
Click to show internal directories.
Click to hide internal directories.