Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- data HostManager
- type Reservations = Set Host
- reserveHosts :: AppId -> Set Host -> KeterM HostManager Reservations
- forgetReservations :: AppId -> Reservations -> KeterM HostManager ()
- activateApp :: AppId -> Map Host (ProxyAction, Credentials) -> KeterM HostManager ()
- deactivateApp :: AppId -> Set Host -> KeterM HostManager ()
- reactivateApp :: AppId -> Map Host (ProxyAction, Credentials) -> Set Host -> KeterM HostManager ()
- lookupAction :: HostManager -> HostBS -> IO (Maybe (ProxyAction, Credentials))
- start :: IO HostManager
Types
data HostManager Source #
type Reservations = Set Host Source #
Actions
reserveHosts :: AppId -> Set Host -> KeterM HostManager Reservations Source #
Reserve the given hosts so that no other application may use them. Does not yet enable any action. The semantics are:
- If a requested host is currently actively used or by an app of the same name, it is considered reserved.
- If a requested host is currently reserved by an app of the same name, it is considered an error in calling this API. Only one app reservation can happen at a time.
- If any requested host is currently used or reserved by an app with a
different name, then those values are returned as
Left
. - Otherwise, the hosts which were reserved are returned as
Right
. This does not include previously active hosts.
forgetReservations :: AppId -> Reservations -> KeterM HostManager () Source #
Forget previously made reservations.
activateApp :: AppId -> Map Host (ProxyAction, Credentials) -> KeterM HostManager () Source #
Activate a new app. Note that you must first reserve the hostnames you'll be using.
deactivateApp :: AppId -> Set Host -> KeterM HostManager () Source #
reactivateApp :: AppId -> Map Host (ProxyAction, Credentials) -> Set Host -> KeterM HostManager () Source #
lookupAction :: HostManager -> HostBS -> IO (Maybe (ProxyAction, Credentials)) Source #
Initialize
start :: IO HostManager Source #