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 WithExtraData ¶ added in v0.3.0
WithExtraData sets the extra data to include in the announce message.
func WithTimeout ¶
WithTimeout configures the timeout to wait for a response.
func WithUserAgent ¶ added in v0.2.3
WithUserAgent sets the value used for the User-Agent header.
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 advertisement announcement messages over HTTP. Announcements are sent directly to the specified URLs. The specified peerID is added to the multiaddrs contained in the announcements, which is how the publisher ID is communicated over HTTP.
Click to show internal directories.
Click to hide internal directories.