httpsender

package
v0.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2023 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAnnouncePath = "/ingest/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

func WithClient(c *http.Client) Option

WithClient uses an existing http.Client with the Sender.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout configures the timeout to wait for a response.

type Sender

type Sender struct {
	// contains filtered or unexported fields
}

func New

func New(announceURLs []*url.URL, options ...Option) (*Sender, error)

func (*Sender) Close

func (s *Sender) Close() error

func (*Sender) Send

func (s *Sender) Send(ctx context.Context, msg message.Message) error

Send sends the Message to the announce URLs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL