| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Cassandra.Settings
Description
This module exports types and functions from Database.CQL.IO, while adding a few wire specific functions.
Synopsis
- module Database.CQL.IO.Tinylog
- retry :: MonadClient m => RetrySettings -> m a -> m a
- random :: IO Policy
- data Consistency
- = Any
- | One
- | LocalOne
- | Two
- | Three
- | Quorum
- | LocalQuorum
- | All
- | EachQuorum
- | Serial
- | LocalSerial
- data ProtocolError where
- UnexpectedResponse :: forall k a b. Host -> Response k a b -> ProtocolError
- UnexpectedQueryId :: forall k a b. QueryId k a b -> ProtocolError
- UnsupportedCompression :: CompressionAlgorithm -> [CompressionAlgorithm] -> ProtocolError
- SerialiseError :: String -> ProtocolError
- ParseError :: String -> ProtocolError
- write :: (MonadClient m, Tuple a, RunQ q) => q W a () -> QueryParams a -> m ()
- shutdown :: MonadIO m => ClientState -> m ()
- once :: MonadClient m => m a -> m a
- data S
- data R
- init :: MonadIO m => Settings -> m ClientState
- trans :: (MonadClient m, Tuple a, RunQ q) => q W a Row -> QueryParams a -> m [Row]
- newtype Identity a = Identity {
- runIdentity :: a
- data W
- newtype QueryString k a b = QueryString {}
- data Row
- fromRow :: Cql a => Int -> Row -> Either String a
- data SerialConsistency
- data QueryParams a = QueryParams !Consistency !Bool a (Maybe Int32) (Maybe PagingState) (Maybe SerialConsistency) (Maybe Bool)
- newtype InetAddr = InetAddr {}
- data HostEvent
- data HostResponse k a b = HostResponse {
- hrHost :: !Host
- hrResponse :: !(Response k a b)
- data Host
- hostAddr :: Lens' Host InetAddr
- dataCentre :: Lens' Host Text
- rack :: Lens' Host Text
- data Policy = Policy {}
- roundRobin :: IO Policy
- data Authenticator = Authenticator {
- authMechanism :: !AuthMechanism
- authOnRequest :: AuthContext -> IO (AuthResponse, s)
- authOnChallenge :: Maybe (s -> AuthChallenge -> IO (AuthResponse, s))
- authOnSuccess :: s -> AuthSuccess -> IO ()
- newtype AuthMechanism = AuthMechanism Text
- data AuthContext
- data ConnId
- authConnId :: Lens' AuthContext ConnId
- authHost :: Lens' AuthContext InetAddr
- newtype AuthPass = AuthPass Text
- newtype AuthUser = AuthUser Text
- passwordAuthenticator :: AuthUser -> AuthPass -> Authenticator
- data AuthenticationError
- data HashCollision = HashCollision !Text !Text
- data ConnectionError
- data HostError
- data ResponseError = ResponseError {}
- data LogLevel
- data Logger = Logger {
- logMessage :: LogLevel -> Builder -> IO ()
- logRequest :: ByteString -> IO ()
- logResponse :: ByteString -> IO ()
- nullLogger :: Logger
- stdoutLogger :: LogLevel -> Logger
- data PrepQuery k a b
- prepared :: QueryString k a b -> PrepQuery k a b
- queryString :: PrepQuery k a b -> QueryString k a b
- defQueryParams :: Consistency -> a -> QueryParams a
- data RetrySettings
- data PrepareStrategy
- data Settings
- defSettings :: Settings
- setProtocolVersion :: Version -> Settings -> Settings
- setContacts :: String -> [String] -> Settings -> Settings
- addContact :: String -> Settings -> Settings
- setPortNumber :: PortNumber -> Settings -> Settings
- setPolicy :: IO Policy -> Settings -> Settings
- setPrepareStrategy :: PrepareStrategy -> Settings -> Settings
- setLogger :: Logger -> Settings -> Settings
- setIdleTimeout :: NominalDiffTime -> Settings -> Settings
- setMaxConnections :: Int -> Settings -> Settings
- setPoolStripes :: Int -> Settings -> Settings
- setMaxTimeouts :: Int -> Settings -> Settings
- setCompression :: Compression -> Settings -> Settings
- setMaxStreams :: Int -> Settings -> Settings
- setConnectTimeout :: NominalDiffTime -> Settings -> Settings
- setSendTimeout :: NominalDiffTime -> Settings -> Settings
- setResponseTimeout :: NominalDiffTime -> Settings -> Settings
- setKeyspace :: Keyspace -> Settings -> Settings
- setRetrySettings :: RetrySettings -> Settings -> Settings
- setMaxRecvBuffer :: Int -> Settings -> Settings
- setSSLContext :: SSLContext -> Settings -> Settings
- setAuthentication :: [Authenticator] -> Settings -> Settings
- noRetry :: RetrySettings
- defRetrySettings :: RetrySettings
- eagerRetrySettings :: RetrySettings
- defRetryPolicy :: RetryPolicy
- eagerRetryPolicy :: RetryPolicy
- defRetryHandlers :: forall (m :: Type -> Type). Monad m => [RetryStatus -> Handler m Bool]
- eagerRetryHandlers :: forall (m :: Type -> Type). Monad m => [RetryStatus -> Handler m Bool]
- setRetryPolicy :: RetryPolicy -> RetrySettings -> RetrySettings
- setRetryHandlers :: (forall (m :: Type -> Type). Monad m => [RetryStatus -> Handler m Bool]) -> RetrySettings -> RetrySettings
- adjustConsistency :: Consistency -> RetrySettings -> RetrySettings
- adjustSendTimeout :: NominalDiffTime -> RetrySettings -> RetrySettings
- adjustResponseTimeout :: NominalDiffTime -> RetrySettings -> RetrySettings
- data ClientState
- data DebugInfo = DebugInfo {
- policyInfo :: String
- jobInfo :: [InetAddr]
- hostInfo :: [Host]
- controlInfo :: (Host, ControlState)
- class (MonadIO m, MonadThrow m) => MonadClient (m :: Type -> Type) where
- liftClient :: Client a -> m a
- localState :: (ClientState -> ClientState) -> m a -> m a
- data Client a
- runClient :: MonadIO m => ClientState -> Client a -> m a
- request :: (MonadClient m, Tuple a, Tuple b) => Request k a b -> m (HostResponse k a b)
- debugInfo :: MonadClient m => m DebugInfo
- getResult :: MonadThrow m => HostResponse k a b -> m (Result k a b)
- data BatchM a
- addQuery :: (Show a, Tuple a, Tuple b) => QueryString W a b -> a -> BatchM ()
- addPrepQuery :: (Show a, Tuple a, Tuple b) => PrepQuery W a b -> a -> BatchM ()
- setType :: BatchType -> BatchM ()
- setConsistency :: Consistency -> BatchM ()
- setSerialConsistency :: SerialConsistency -> BatchM ()
- data Page a = Page {}
- class RunQ (q :: Type -> Type -> Type -> Type) where
- runQ :: (MonadClient m, Tuple a, Tuple b) => q k a b -> QueryParams a -> m (HostResponse k a b)
- query :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m [b]
- query1 :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m (Maybe b)
- schema :: (MonadClient m, Tuple a, RunQ q) => q S a () -> QueryParams a -> m (Maybe SchemaChange)
- batch :: MonadClient m => BatchM () -> m ()
- emptyPage :: Page a
- paginate :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m (Page b)
- initialContactsDisco :: MonadIO m => String -> String -> m (NonEmpty String)
- initialContactsPlain :: MonadIO m => Text -> m (NonEmpty String)
- dcAwareRandomPolicy :: Text -> IO Policy
- dcFilterPolicyIfConfigured :: Logger -> Maybe Text -> IO Policy
Documentation
module Database.CQL.IO.Tinylog
retry :: MonadClient m => RetrySettings -> m a -> m a #
data Consistency Source #
Consistency level.
See: Consistency
Constructors
| Any | |
| One | |
| LocalOne | |
| Two | |
| Three | |
| Quorum | |
| LocalQuorum | |
| All | |
| EachQuorum | Only for write queries. |
| Serial | Only for read queries. |
| LocalSerial | Only for read queries. |
Instances
| Show Consistency | |
Defined in Database.CQL.Protocol.Types Methods showsPrec :: Int -> Consistency -> ShowS # show :: Consistency -> String # showList :: [Consistency] -> ShowS # | |
| Eq Consistency | |
Defined in Database.CQL.Protocol.Types | |
data ProtocolError where #
Constructors
| UnexpectedResponse :: forall k a b. Host -> Response k a b -> ProtocolError | |
| UnexpectedQueryId :: forall k a b. QueryId k a b -> ProtocolError | |
| UnsupportedCompression :: CompressionAlgorithm -> [CompressionAlgorithm] -> ProtocolError | |
| SerialiseError :: String -> ProtocolError | |
| ParseError :: String -> ProtocolError |
Instances
| Exception ProtocolError | |
Defined in Database.CQL.IO.Exception Methods toException :: ProtocolError -> SomeException # fromException :: SomeException -> Maybe ProtocolError # displayException :: ProtocolError -> String # | |
| Show ProtocolError | |
Defined in Database.CQL.IO.Exception Methods showsPrec :: Int -> ProtocolError -> ShowS # show :: ProtocolError -> String # showList :: [ProtocolError] -> ShowS # | |
write :: (MonadClient m, Tuple a, RunQ q) => q W a () -> QueryParams a -> m () Source #
Run a CQL write-only query (e.g. insert/update/delete), returning no result.
/Note: If the write operation is conditional, i.e. is in fact a "lightweight
transaction" returning a result, trans must be used instead./
shutdown :: MonadIO m => ClientState -> m () #
once :: MonadClient m => m a -> m a #
init :: MonadIO m => Settings -> m ClientState #
trans :: (MonadClient m, Tuple a, RunQ q) => q W a Row -> QueryParams a -> m [Row] Source #
Run a CQL conditional write query (e.g. insert/update/delete) as a
"lightweight transaction", returning the result Rows describing the
outcome.
Identity functor and monad. (a non-strict monad)
Since: base-4.8.0.0
Constructors
| Identity | |
Fields
| |
Instances
newtype QueryString k a b Source #
Constructors
| QueryString | |
Fields | |
Instances
| RunQ QueryString | |
Defined in Database.CQL.IO Methods runQ :: (MonadClient m, Tuple a, Tuple b) => QueryString k a b -> QueryParams a -> m (HostResponse k a b) Source # | |
| IsString (QueryString k a b) | |
Defined in Database.CQL.Protocol.Types Methods fromString :: String -> QueryString k a b # | |
| Show (QueryString k a b) | |
Defined in Database.CQL.Protocol.Types Methods showsPrec :: Int -> QueryString k a b -> ShowS # show :: QueryString k a b -> String # showList :: [QueryString k a b] -> ShowS # | |
| Eq (QueryString k a b) | |
Defined in Database.CQL.Protocol.Types Methods (==) :: QueryString k a b -> QueryString k a b -> Bool # (/=) :: QueryString k a b -> QueryString k a b -> Bool # | |
A row is a vector of Values.
data SerialConsistency Source #
Consistency level for the serial phase of conditional updates (aka "lightweight transactions").
See: SerialConsistency
Constructors
| SerialConsistency | Default. Quorum-based linearizable consistency. |
| LocalSerialConsistency | Like |
Instances
| Show SerialConsistency | |
Defined in Database.CQL.Protocol.Request Methods showsPrec :: Int -> SerialConsistency -> ShowS # show :: SerialConsistency -> String # showList :: [SerialConsistency] -> ShowS # | |
data QueryParams a Source #
Query parameters.
Constructors
| QueryParams !Consistency !Bool a (Maybe Int32) (Maybe PagingState) (Maybe SerialConsistency) (Maybe Bool) |
Instances
| Show a => Show (QueryParams a) | |
Defined in Database.CQL.Protocol.Request Methods showsPrec :: Int -> QueryParams a -> ShowS # show :: QueryParams a -> String # showList :: [QueryParams a] -> ShowS # | |
data HostResponse k a b #
Constructors
| HostResponse | |
Fields
| |
Instances
| Show b => Show (HostResponse k a b) | |
Defined in Database.CQL.IO.Cluster.Host Methods showsPrec :: Int -> HostResponse k a b -> ShowS # show :: HostResponse k a b -> String # showList :: [HostResponse k a b] -> ShowS # | |
dataCentre :: Lens' Host Text #
roundRobin :: IO Policy #
data Authenticator #
Constructors
| Authenticator | |
Fields
| |
newtype AuthMechanism #
Constructors
| AuthMechanism Text |
Instances
| IsString AuthMechanism | |
Defined in Database.CQL.IO.Connection.Settings Methods fromString :: String -> AuthMechanism # | |
| Show AuthMechanism | |
Defined in Database.CQL.IO.Connection.Settings Methods showsPrec :: Int -> AuthMechanism -> ShowS # show :: AuthMechanism -> String # showList :: [AuthMechanism] -> ShowS # | |
| Eq AuthMechanism | |
Defined in Database.CQL.IO.Connection.Settings Methods (==) :: AuthMechanism -> AuthMechanism -> Bool # (/=) :: AuthMechanism -> AuthMechanism -> Bool # | |
| Ord AuthMechanism | |
Defined in Database.CQL.IO.Connection.Settings Methods compare :: AuthMechanism -> AuthMechanism -> Ordering # (<) :: AuthMechanism -> AuthMechanism -> Bool # (<=) :: AuthMechanism -> AuthMechanism -> Bool # (>) :: AuthMechanism -> AuthMechanism -> Bool # (>=) :: AuthMechanism -> AuthMechanism -> Bool # max :: AuthMechanism -> AuthMechanism -> AuthMechanism # min :: AuthMechanism -> AuthMechanism -> AuthMechanism # | |
| Hashable AuthMechanism | |
Defined in Database.CQL.IO.Connection.Settings | |
data AuthContext #
passwordAuthenticator :: AuthUser -> AuthPass -> Authenticator #
data AuthenticationError #
Constructors
| AuthenticationRequired !AuthMechanism | |
| UnexpectedAuthenticationChallenge !AuthMechanism !AuthChallenge |
Instances
| Exception AuthenticationError | |
Defined in Database.CQL.IO.Exception Methods toException :: AuthenticationError -> SomeException # fromException :: SomeException -> Maybe AuthenticationError # | |
| Show AuthenticationError | |
Defined in Database.CQL.IO.Exception Methods showsPrec :: Int -> AuthenticationError -> ShowS # show :: AuthenticationError -> String # showList :: [AuthenticationError] -> ShowS # | |
data HashCollision #
Constructors
| HashCollision !Text !Text |
Instances
| Exception HashCollision | |
Defined in Database.CQL.IO.Exception Methods toException :: HashCollision -> SomeException # fromException :: SomeException -> Maybe HashCollision # displayException :: HashCollision -> String # | |
| Show HashCollision | |
Defined in Database.CQL.IO.Exception Methods showsPrec :: Int -> HashCollision -> ShowS # show :: HashCollision -> String # showList :: [HashCollision] -> ShowS # | |
data ConnectionError #
Constructors
| ConnectionClosed !InetAddr | |
| ConnectTimeout !InetAddr | |
| ResponseTimeout !InetAddr |
Instances
| Exception ConnectionError | |
Defined in Database.CQL.IO.Exception Methods toException :: ConnectionError -> SomeException # | |
| Show ConnectionError | |
Defined in Database.CQL.IO.Exception Methods showsPrec :: Int -> ConnectionError -> ShowS # show :: ConnectionError -> String # showList :: [ConnectionError] -> ShowS # | |
Constructors
| NoHostAvailable | |
| HostsBusy |
Instances
| Exception HostError | |
Defined in Database.CQL.IO.Exception Methods toException :: HostError -> SomeException # fromException :: SomeException -> Maybe HostError # displayException :: HostError -> String # | |
| Show HostError | |
data ResponseError #
Constructors
| ResponseError | |
Instances
| Exception ResponseError | |
Defined in Database.CQL.IO.Exception Methods toException :: ResponseError -> SomeException # fromException :: SomeException -> Maybe ResponseError # displayException :: ResponseError -> String # | |
| Show ResponseError | |
Defined in Database.CQL.IO.Exception Methods showsPrec :: Int -> ResponseError -> ShowS # show :: ResponseError -> String # showList :: [ResponseError] -> ShowS # | |
Constructors
| Logger | |
Fields
| |
nullLogger :: Logger #
stdoutLogger :: LogLevel -> Logger #
Instances
| RunQ PrepQuery | |
Defined in Database.CQL.IO Methods runQ :: (MonadClient m, Tuple a, Tuple b) => PrepQuery k a b -> QueryParams a -> m (HostResponse k a b) Source # | |
| IsString (PrepQuery k a b) | |
Defined in Database.CQL.IO.PrepQuery Methods fromString :: String -> PrepQuery k a b # | |
prepared :: QueryString k a b -> PrepQuery k a b #
queryString :: PrepQuery k a b -> QueryString k a b #
defQueryParams :: Consistency -> a -> QueryParams a #
data RetrySettings #
data PrepareStrategy #
Constructors
| EagerPrepare | |
| LazyPrepare |
Instances
| Show PrepareStrategy | |
Defined in Database.CQL.IO.Settings Methods showsPrec :: Int -> PrepareStrategy -> ShowS # show :: PrepareStrategy -> String # showList :: [PrepareStrategy] -> ShowS # | |
| Eq PrepareStrategy | |
Defined in Database.CQL.IO.Settings Methods (==) :: PrepareStrategy -> PrepareStrategy -> Bool # (/=) :: PrepareStrategy -> PrepareStrategy -> Bool # | |
| Ord PrepareStrategy | |
Defined in Database.CQL.IO.Settings Methods compare :: PrepareStrategy -> PrepareStrategy -> Ordering # (<) :: PrepareStrategy -> PrepareStrategy -> Bool # (<=) :: PrepareStrategy -> PrepareStrategy -> Bool # (>) :: PrepareStrategy -> PrepareStrategy -> Bool # (>=) :: PrepareStrategy -> PrepareStrategy -> Bool # max :: PrepareStrategy -> PrepareStrategy -> PrepareStrategy # min :: PrepareStrategy -> PrepareStrategy -> PrepareStrategy # | |
defSettings :: Settings #
setProtocolVersion :: Version -> Settings -> Settings #
addContact :: String -> Settings -> Settings #
setPortNumber :: PortNumber -> Settings -> Settings #
setPrepareStrategy :: PrepareStrategy -> Settings -> Settings #
setIdleTimeout :: NominalDiffTime -> Settings -> Settings #
setMaxConnections :: Int -> Settings -> Settings #
setPoolStripes :: Int -> Settings -> Settings #
setMaxTimeouts :: Int -> Settings -> Settings #
setCompression :: Compression -> Settings -> Settings #
setMaxStreams :: Int -> Settings -> Settings #
setConnectTimeout :: NominalDiffTime -> Settings -> Settings #
setSendTimeout :: NominalDiffTime -> Settings -> Settings #
setResponseTimeout :: NominalDiffTime -> Settings -> Settings #
setKeyspace :: Keyspace -> Settings -> Settings #
setRetrySettings :: RetrySettings -> Settings -> Settings #
setMaxRecvBuffer :: Int -> Settings -> Settings #
setSSLContext :: SSLContext -> Settings -> Settings #
setAuthentication :: [Authenticator] -> Settings -> Settings #
defRetryHandlers :: forall (m :: Type -> Type). Monad m => [RetryStatus -> Handler m Bool] #
eagerRetryHandlers :: forall (m :: Type -> Type). Monad m => [RetryStatus -> Handler m Bool] #
setRetryPolicy :: RetryPolicy -> RetrySettings -> RetrySettings #
setRetryHandlers :: (forall (m :: Type -> Type). Monad m => [RetryStatus -> Handler m Bool]) -> RetrySettings -> RetrySettings #
data ClientState #
Instances
| MonadReader ClientState Client | |
Defined in Database.CQL.IO.Client Methods ask :: Client ClientState # local :: (ClientState -> ClientState) -> Client a -> Client a # reader :: (ClientState -> a) -> Client a # | |
Constructors
| DebugInfo | |
Fields
| |
class (MonadIO m, MonadThrow m) => MonadClient (m :: Type -> Type) where #
Instances
| MonadClient Client | |
Defined in Database.CQL.IO.Client Methods liftClient :: Client a -> Client a # localState :: (ClientState -> ClientState) -> Client a -> Client a # | |
| MonadClient m => MonadClient (ExceptT e m) | |
Defined in Database.CQL.IO.Client Methods liftClient :: Client a -> ExceptT e m a # localState :: (ClientState -> ClientState) -> ExceptT e m a -> ExceptT e m a # | |
| MonadClient m => MonadClient (ReaderT r m) | |
Defined in Database.CQL.IO.Client Methods liftClient :: Client a -> ReaderT r m a # localState :: (ClientState -> ClientState) -> ReaderT r m a -> ReaderT r m a # | |
| MonadClient m => MonadClient (StateT s m) | |
Defined in Database.CQL.IO.Client Methods liftClient :: Client a -> StateT s m a # localState :: (ClientState -> ClientState) -> StateT s m a -> StateT s m a # | |
| MonadClient m => MonadClient (StateT s m) | |
Defined in Database.CQL.IO.Client Methods liftClient :: Client a -> StateT s m a # localState :: (ClientState -> ClientState) -> StateT s m a -> StateT s m a # | |
Instances
| MonadIO Client | |
Defined in Database.CQL.IO.Client | |
| Applicative Client | |
| Functor Client | |
| Monad Client | |
| MonadClient Client | |
Defined in Database.CQL.IO.Client Methods liftClient :: Client a -> Client a # localState :: (ClientState -> ClientState) -> Client a -> Client a # | |
| MonadCatch Client | |
Defined in Database.CQL.IO.Client | |
| MonadMask Client | |
Defined in Database.CQL.IO.Client Methods mask :: HasCallStack => ((forall a. Client a -> Client a) -> Client b) -> Client b # uninterruptibleMask :: HasCallStack => ((forall a. Client a -> Client a) -> Client b) -> Client b # generalBracket :: HasCallStack => Client a -> (a -> ExitCase b -> Client c) -> (a -> Client b) -> Client (b, c) # | |
| MonadThrow Client | |
Defined in Database.CQL.IO.Client Methods throwM :: (HasCallStack, Exception e) => e -> Client a # | |
| MonadUnliftIO Client | |
Defined in Database.CQL.IO.Client | |
| MonadReader ClientState Client | |
Defined in Database.CQL.IO.Client Methods ask :: Client ClientState # local :: (ClientState -> ClientState) -> Client a -> Client a # reader :: (ClientState -> a) -> Client a # | |
runClient :: MonadIO m => ClientState -> Client a -> m a #
request :: (MonadClient m, Tuple a, Tuple b) => Request k a b -> m (HostResponse k a b) #
debugInfo :: MonadClient m => m DebugInfo #
getResult :: MonadThrow m => HostResponse k a b -> m (Result k a b) #
setConsistency :: Consistency -> BatchM () #
setSerialConsistency :: SerialConsistency -> BatchM () #
Return value of paginate. Contains the actual result values as well
as an indication of whether there is more data available and the actual
action to fetch the next page.
class RunQ (q :: Type -> Type -> Type -> Type) where Source #
A type which can be run as a query.
Methods
runQ :: (MonadClient m, Tuple a, Tuple b) => q k a b -> QueryParams a -> m (HostResponse k a b) Source #
Instances
| RunQ QueryString | |
Defined in Database.CQL.IO Methods runQ :: (MonadClient m, Tuple a, Tuple b) => QueryString k a b -> QueryParams a -> m (HostResponse k a b) Source # | |
| RunQ PrepQuery | |
Defined in Database.CQL.IO Methods runQ :: (MonadClient m, Tuple a, Tuple b) => PrepQuery k a b -> QueryParams a -> m (HostResponse k a b) Source # | |
query :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m [b] Source #
Run a CQL read-only query returning a list of results.
query1 :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m (Maybe b) Source #
Run a CQL read-only query returning a single result.
schema :: (MonadClient m, Tuple a, RunQ q) => q S a () -> QueryParams a -> m (Maybe SchemaChange) Source #
Run a CQL schema query, returning SchemaChange information, if any.
batch :: MonadClient m => BatchM () -> m () Source #
Run a batch query against a Cassandra node.
paginate :: (MonadClient m, Tuple a, Tuple b, RunQ q) => q R a b -> QueryParams a -> m (Page b) Source #
Run a CQL read-only query against a Cassandra node.
This function is like query, but limits the result size to 10000
(default) unless there is an explicit size restriction given in
QueryParams. The returned Page can be used to continue the query.
Please note that -- as of Cassandra 2.1.0 -- if your requested page size
is equal to the result size, hasMore might be true and a subsequent
nextPage will return an empty list in result.
initialContactsDisco :: MonadIO m => String -> String -> m (NonEmpty String) Source #
This function is likely only useful at Wire, as it is Wire-infra specific. Given a server name and a url returning a wire-custom "disco" json (AWS describe-instances-like json), e.g. { "roles" : { "server_name": [ {"privateIpAddress": "...", ...}, {...} ] } }, return a list of IP addresses.
initialContactsPlain :: MonadIO m => Text -> m (NonEmpty String) Source #
Puts the address into a list using the same signature as the other initialContacts