Currently the SocketID has a generated prefix from one source. In order to allow custom prefixes the ID should contain two parts the ID and the Prefix. This way there can't be custom generators that can generate fake-able ID's in the system. The two parts could look like something as simple as:
type ID struct { prefix, id string }
This needs to be threaded throughout the system, and must convert to a String() for logging and debugging.
Currently the SocketID has a generated prefix from one source. In order to allow custom prefixes the ID should contain two parts the ID and the Prefix. This way there can't be custom generators that can generate fake-able ID's in the system. The two parts could look like something as simple as:
This needs to be threaded throughout the system, and must convert to a String() for logging and debugging.