Closed vincentwoo closed 8 years ago
@vincentwoo Thanks for asking and sorry for the delay in responding.
However, I believe the README is correct. The createClientV1
and createClientV2
functions don't need to make any requests to the registry, so can be sync (i.e. not require a callback). The createClient
function is a convenience function that will ping the registry to see if it supports the Docker V2 Registry API. That ping request means a callback is necessary.
Looking through the code, it seems stuff has changed. For instance, I think drc.createClient now requires a callback, though the example on the README does not:
var client = drc.createClientV2({name: REPO});