insert cluster UUIDs when loading location logs, and omit when saving
Inline isClusterUUID for speed.
This commit is contained in:
parent
a4c9d4424c
commit
b3370a191c
4 changed files with 55 additions and 23 deletions
|
@ -11,6 +11,7 @@ module Types.Cluster (
|
|||
ClusterUUID,
|
||||
mkClusterUUID,
|
||||
genClusterUUID,
|
||||
fromClusterUUID,
|
||||
isClusterUUID,
|
||||
fromClusterUUID,
|
||||
ClusterNodeUUID(..),
|
||||
|
@ -52,6 +53,8 @@ isClusterUUID (UUID b)
|
|||
eight = fromIntegral (ord '8')
|
||||
isClusterUUID _ = False
|
||||
|
||||
{-# INLINE isClusterUUID #-}
|
||||
|
||||
-- Generates a ClusterUUID from any regular UUID (eg V4).
|
||||
-- It is converted to a valid cluster UUID.
|
||||
genClusterUUID :: UUID -> Maybe ClusterUUID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue