This PR implements my current idea for a new interface for performance data handling.
The main advantages are a reasonable sanity checks for special cases (Inf and Nan), almost having type safety and a reasonable interface for users.
Perfdata value must now be created with new initializer functions (NewPdvInt64, NewPdvUint64andNewPdvFloat64`), which, given a number, will create the corresponding Perfdata Value.
Sadly I could not find a good way to make this generic and with restricted types, so encoding a data type in the initializer it is.
This PR implements my current idea for a new interface for performance data handling. The main advantages are a reasonable sanity checks for special cases (
Inf
andNan
), almost having type safety and a reasonable interface for users.Perfdata value must now be created with new initializer functions (
NewPdvInt64
, NewPdvUint64and
NewPdvFloat64`), which, given a number, will create the corresponding Perfdata Value.Sadly I could not find a good way to make this generic and with restricted types, so encoding a data type in the initializer it is.
Would be interested to get some feedback on this.