ipni / index-provider

📢 Index Provider

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

split out cmd functionality

willscott opened this issue · comments

commented

we have a lot of unrelated things going on in the cmd package here.

We should ideally split out:

  • full standalone / production-mode operation (e.g. mirror) into it's own command that uses this engine library.
  • Utilities we expect providers to run (like verify) into a tools CLI DONE in ipni-cli
  • A simple reference provider of car files that other providers can refer to in order to quickly see how to integrate the engine library.

As in separate provider mirror into mirror executable? If so, I am curious why?

commented
  • reduces surface area of the code in the binary that's deployed / running on the internet
  • reduces dependencies / complexity of the download of tools needed for providers running things like verify
  • makes it clear what the reference code path is for people looking at it

Are you thinking we have an executable for each of those? From usability perspective I am not sure it makes sense to do a go install for each. Re dependencies, How much does it matter when the executable itself is small anyway?

Having said all of this, happy to discuss the restructuring further over a PR; that would help me get my head around the changes.