mirror of
https://github.com/typeable/bloodhound.git
synced 2024-09-11 08:25:32 +03:00
Don't attempt to validate VM version numbers
This commit is contained in:
parent
4b8dcea66a
commit
ebf7206ae5
@ -1418,7 +1418,7 @@ data NodeJVMInfo = NodeJVMInfo {
|
||||
, nodeJVMInfoMemoryInfo :: JVMMemoryInfo
|
||||
, nodeJVMInfoStartTime :: UTCTime
|
||||
, nodeJVMInfoVMVendor :: Text
|
||||
, nodeJVMVMVersion :: VersionNumber
|
||||
, nodeJVMVMVersion :: VMVersion
|
||||
-- ^ JVM doesn't seme to follow normal version conventions
|
||||
, nodeJVMVMName :: Text
|
||||
, nodeJVMVersion :: VersionNumber
|
||||
@ -1436,6 +1436,18 @@ data JVMMemoryInfo = JVMMemoryInfo {
|
||||
, jvmMemoryInfoHeapInit :: Bytes
|
||||
} deriving (Eq, Show)
|
||||
|
||||
-- VM version numbers don't appear to be SemVer
|
||||
-- so we're special casing this jawn.
|
||||
newtype VMVersion =
|
||||
VMVersion { unVMVersion :: Text }
|
||||
deriving (Eq, Show)
|
||||
|
||||
instance ToJSON VMVersion where
|
||||
toJSON = toJSON . unVMVersion
|
||||
|
||||
instance FromJSON VMVersion where
|
||||
parseJSON = withText "VMVersion" (pure . VMVersion)
|
||||
|
||||
newtype JVMMemoryPool = JVMMemoryPool {
|
||||
jvmMemoryPool :: Text
|
||||
} deriving (Eq, Show, FromJSON)
|
||||
|
Loading…
Reference in New Issue
Block a user