Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 759 Bytes

id_maker.md

File metadata and controls

14 lines (12 loc) · 759 Bytes

ID Maker

Next

The way that Dingo generates new IDs for new tasks can be customized. It relies on the interface dingo.IDMaker which has these methods:

NewID() (string, error)

Internally, Dingo uses uuid4 for IDs, its uniqueness is 99.9999% promised, but not 100%. In production, you may rely on some distributed ID generator like:

Two things to note:

  • No matter what type you generated, convert it to string
  • The uniqueness of task/report is by comparing (name, id) pairs, so you can have separated IDMakers for different kinds of tasks.