add: --ready flag for postgrest healthcheck
The `--ready` flag is a wrapper around the admin server `/ready` request. This is done through using an http client library in postgrest. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
committed by
Steve Chavez
parent
ab2cd766c2
commit
a9a1763328
@@ -1,6 +1,7 @@
|
||||
module PostgREST.Network
|
||||
( resolveSocketToAddress
|
||||
, escapeHostName
|
||||
, isSpecialHostName
|
||||
) where
|
||||
|
||||
import Data.String (IsString (..))
|
||||
@@ -49,3 +50,12 @@ escapeHostName "!4" = "0.0.0.0"
|
||||
escapeHostName "*6" = "0.0.0.0"
|
||||
escapeHostName "!6" = "0.0.0.0"
|
||||
escapeHostName h = h
|
||||
|
||||
-- | Check if a hostname is special
|
||||
isSpecialHostName :: Text -> Bool
|
||||
isSpecialHostName "*" = True
|
||||
isSpecialHostName "*4" = True
|
||||
isSpecialHostName "!4" = True
|
||||
isSpecialHostName "*6" = True
|
||||
isSpecialHostName "!6" = True
|
||||
isSpecialHostName _ = False
|
||||
|
||||
Reference in New Issue
Block a user