Closed dlsniper closed 9 years ago
The AWS metadata API has the fixed IP address and URL. So it is hard coded. See http://docs.aws.amazon.com/en_us/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
If you'd like to use a different kind of MachineID, you can set Settings.MachineID.
Makes sense. Thanks for the fast reply.
Hi,
Thanks for open sourcing this. I've read the source code and it seems that here https://github.com/sony/sonyflake/blob/master/awsutil/awsutil.go#L16 the IP address / URL is hard coded and can't be changed by the user. Shouldn't this be part of some sort of parameter one initializes the package with?
I can work on a PR to do the following changes:
However this would be a breaking change and I'd like to know your thoughts on this one first.