Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
newtype InstanceName backend Source #
Instances
mkInstanceName :: Text -> InstanceName backend Source #
data InstanceDoesNotExist backend Source #
InstanceDoesNotExist | |
|
Instances
Eq (InstanceDoesNotExist backend) Source # | |
Defined in Data.MultiPool (==) :: InstanceDoesNotExist backend -> InstanceDoesNotExist backend -> Bool # (/=) :: InstanceDoesNotExist backend -> InstanceDoesNotExist backend -> Bool # | |
Show (InstanceDoesNotExist backend) Source # | |
Defined in Data.MultiPool showsPrec :: Int -> InstanceDoesNotExist backend -> ShowS # show :: InstanceDoesNotExist backend -> String # showList :: [InstanceDoesNotExist backend] -> ShowS # | |
(Show (InstanceDoesNotExist backend), Typeable backend) => Exception (InstanceDoesNotExist backend) Source # | |
Defined in Data.MultiPool toException :: InstanceDoesNotExist backend -> SomeException # fromException :: SomeException -> Maybe (InstanceDoesNotExist backend) # displayException :: InstanceDoesNotExist backend -> String # |
class Monad m => MultiPoolBackend m backend where Source #
type Primaries backend :: * Source #
type Replicas backend :: * Source #
type LocalPrimary backend :: * Source #
type LocalReplica backend :: * Source #
type PrimaryConnection backend :: * Source #
type ReplicaConnection backend :: * Source #
type PrimaryIdentifier backend :: * Source #
type ReplicaIdentifier backend :: * Source #
runWriteAny :: MultiPool backend -> ReaderT (PrimaryConnection backend) m a -> m a Source #
runWrite :: MultiPool backend -> PrimaryIdentifier backend -> ReaderT (PrimaryConnection backend) m a -> m a Source #
runReadPrimary :: MultiPool backend -> PrimaryIdentifier backend -> ReaderT (ReplicaConnection backend) m a -> m a Source #
runReadAnyPrimary :: MultiPool backend -> ReaderT (ReplicaConnection backend) m a -> m a Source #
runReadAny :: MultiPool backend -> ReaderT (ReplicaConnection backend) m a -> m a Source #
runRead :: MultiPool backend -> ReplicaIdentifier backend -> ReaderT (ReplicaConnection backend) m a -> m a Source #
takePrimary :: MultiPool backend -> PrimaryIdentifier backend -> m (PrimaryConnection backend, LocalPrimary backend) Source #
putPrimary :: MultiPool backend -> LocalPrimary backend -> PrimaryConnection backend -> m () Source #
takeReplica :: MultiPool backend -> ReplicaIdentifier backend -> m (ReplicaConnection backend, LocalReplica backend) Source #
putReplica :: MultiPool backend -> LocalReplica backend -> ReplicaConnection backend -> m () Source #
data MultiPool backend Source #
MultiPool | |
|
forReplicas :: (MultiPoolBackend m backend, Replicas backend ~ HashMap k v) => MultiPool backend -> (k -> v -> m a) -> m [a] Source #