mirror of
https://github.com/genuinetools/reg.git
synced 2024-10-03 13:51:45 -04:00
3075c58bc1
Signed-off-by: Jess Frazelle <acidburn@google.com>
12 lines
282 B
Go
12 lines
282 B
Go
package registry
|
|
|
|
// Ping tries to contact a registry URL to make sure it is up and accessible.
|
|
func (r *Registry) Ping() error {
|
|
url := r.url("/v2/")
|
|
r.Logf("registry.ping url=%s", url)
|
|
resp, err := r.Client.Get(url)
|
|
if resp != nil {
|
|
defer resp.Body.Close()
|
|
}
|
|
return err
|
|
}
|