TritonDataCenter / node-docker-registry-client

node.js client for the docker registry
Mozilla Public License 2.0
64 stars 33 forks source link

README appears out of date #5

Closed vincentwoo closed 8 years ago

vincentwoo commented 8 years ago

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});

trentm commented 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.