type urlPicker … func newURLPicker(urls types.URLs) *urlPicker { … } func (p *urlPicker) update(urls types.URLs) { … } func (p *urlPicker) pick() url.URL { … } // unreachable notices the picker that the given url is unreachable, // and it should use other possible urls. func (p *urlPicker) unreachable(u url.URL) { … }