Documentation
¶
Index ¶
- Variables
- func AccesspointPorts(ports []int, preferFirewallFriendly bool) []int
- type ApResolver
- func (r *ApResolver) FetchAll(ctx context.Context) error
- func (r *ApResolver) GetAccesspoint(ctx context.Context) (librespot.GetAddressFunc, error)
- func (r *ApResolver) GetDealer(ctx context.Context) (librespot.GetAddressFunc, error)
- func (r *ApResolver) GetSpclient(ctx context.Context) (librespot.GetAddressFunc, error)
Constants ¶
This section is empty.
Variables ¶
var FirewallFriendlyPorts = []int{443, 80}
FirewallFriendlyPorts is the accesspoint port order for networks that only allow HTTP and HTTPS outbound.
Functions ¶
func AccesspointPorts ¶ added in v0.10.6
AccesspointPorts is the port order to try accesspoints in: ports when set, else FirewallFriendlyPorts when preferFirewallFriendly, else nil (keep the directory's order).
Types ¶
type ApResolver ¶
type ApResolver struct {
// contains filtered or unexported fields
}
func NewApResolver ¶
NewApResolver builds a resolver for Spotify's endpoint directory. Accesspoints on accesspointPorts are tried first, in that order, then the rest in the directory's order; nil keeps the directory's order.
func (*ApResolver) GetAccesspoint ¶
func (r *ApResolver) GetAccesspoint(ctx context.Context) (librespot.GetAddressFunc, error)
func (*ApResolver) GetDealer ¶
func (r *ApResolver) GetDealer(ctx context.Context) (librespot.GetAddressFunc, error)
func (*ApResolver) GetSpclient ¶
func (r *ApResolver) GetSpclient(ctx context.Context) (librespot.GetAddressFunc, error)