// EnvUnt64 generates an uint64 id from envirment variables
// SERVER_ID: unique numeric value represents this server
// PROCESS_ID: unique numeric value represents this process.
EnvUnt64 generates an uint64 id from envirment variables
SERVER_ID: unique numeric value represents this server
PROCESS_ID: unique numeric value represents this process.
// EnvUnt64 generates an uint64 id from envirment variables // SERVER_ID : unique numeric value represents this server // PROCESS_ID : unique numeric value represents this process .
func EnvUint64(c *Uint64Config) (uint64, error) {
	serverIDText := os.Getenv(serverIDKey)
	serverID, err := strconv.ParseUint(serverIDText, 10, 64)
	if err != nil {
		return 0, fmt.Errorf("parsing serverID from env("+serverIDKey+") -> %v", err)
	}
	processIDText := os.Getenv(processIDKey)
	processID, err := strconv.ParseUint(processIDText, 10, 64)
	if err != nil {
		return 0, fmt.Errorf("parsing processID from env("+processIDKey+") -> %v", err)
	}
	return Uint64(serverID, processID, c), nil
}
func EnvUint64 ( c * Uint64Config ) ( uint64 , error ) { serverIDText := os . Getenv ( serverIDKey ) serverID , err := strconv . ParseUint ( serverIDText , 10 , 64 ) if err != nil { return 0 , fmt . Errorf ( " " + serverIDKey + " " , err ) } processIDText := os . Getenv ( processIDKey ) processID , err := strconv . ParseUint ( processIDText , 10 , 64 ) if err != nil { return 0 , fmt . Errorf ( " " + processIDKey + " " , err ) } return Uint64 ( serverID , processID , c ) , nil }
EnvUnt64 generates an uint64 id from envirment variables
SERVER_ID: unique numeric value represents this server
PROCESS_ID: unique numeric value represents this process.
EnvUnt64 generates an uint64 id from envirment variables SERVER_ID : unique numeric value represents this server PROCESS_ID : unique numeric value represents this process .
// server ID` // process ID