buf generategosec -exclude-dir=pkg/pb ./... go run cmd/simulator/main.go go run cmd/grpc/main.go go run cmd/http/main.go docker build -t fasttrack/random . docker run -p 8080:3401 -e SEED_HEX=0000000000000000000000000000000000000000000000000000000000000000 fasttrack/random grpc docker run -p 8081:3402 -e SEED_HEX=0000000000000000000000000000000000000000000000000000000000000000 fasttrack/random http GET http://localhost:8081/getRandomFloat64 GET http://localhost:8081/getRandomInt64?min=0&max=10
Querystring parameters:
min - minimum number (inclusive)
max - maximum number (inclusive) GET http://localhost:8081/getDeterministicRandom?s=42&p=0.01,0.4,0.59
Querystring parameters:
(s)equence - the sequence number of the random number
(p)robabilities - the set of probabilities to select an index fromThere are several sites where a hex code can be generated.
Example: https://codebeautify.org/generate-random-hexadecimal-numbers
Simply set 'length of hex number' to 64 and generate one.
The results from function DeterministicRandom can be tested for consistency by using the simulator to generate results and then hashing the result of two runs with the same parameters.
shasum -a 256 cmd/simulator/results/DeterministicRandom-X.csv