Documentation ¶
Index ¶
- Constants
- func NewRequestCanary(ctx context.Context, hostURL string) (*http.Request, error)
- func NewRequestMirrors(ctx context.Context, hostURL string) (*http.Request, error)
- func NewRequestRelated(ctx context.Context, hostURL string) (*http.Request, error)
- type Client
- func (c Client) GetCanaryMessage(ctx context.Context, hostURL string) (spec.Canary, error)
- func (c Client) GetMirrorsMessage(ctx context.Context, hostURL string) (spec.Mirrors, error)
- func (c Client) GetRelatedMessage(ctx context.Context, hostURL string) (spec.Mirrors, error)
- func (c *Client) SetUserAgent(ua string)
Constants ¶
View Source
const DefaultUserAgent = "go-omg/1.0"
Variables ¶
This section is empty.
Functions ¶
func NewRequestCanary ¶
func NewRequestMirrors ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) GetCanaryMessage ¶
GetCanaryMessage makes an HTTP request to a host and downloads contents of canary.txt.
func (Client) GetMirrorsMessage ¶
GetMirrorsMessage makes an HTTP request to a host and downloads contents of mirrors.txt.
func (Client) GetRelatedMessage ¶
GetRelatedMessage makes an HTTP request to a host and downloads contents of related.txt.
func (*Client) SetUserAgent ¶
Click to show internal directories.
Click to hide internal directories.