Hoogle Search

Within LTS Haskell 24.39 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. dBusPropertyInfoRef :: (HasCallStack, MonadIO m) => DBusPropertyInfo -> m DBusPropertyInfo

    gi-gio GI.Gio.Structs.DBusPropertyInfo

    If info is statically allocated does nothing. Otherwise increases the reference count. Since: 2.26

  2. getDBusPropertyInfoRefCount :: MonadIO m => DBusPropertyInfo -> m Int32

    gi-gio GI.Gio.Structs.DBusPropertyInfo

    Get the value of the “ref_count” field. When overloading is enabled, this is equivalent to

    get dBusPropertyInfo #refCount
    

  3. setDBusPropertyInfoRefCount :: MonadIO m => DBusPropertyInfo -> Int32 -> m ()

    gi-gio GI.Gio.Structs.DBusPropertyInfo

    Set the value of the “ref_count” field. When overloading is enabled, this is equivalent to

    set dBusPropertyInfo [ #refCount := value ]
    

  4. dBusSignalInfoRef :: (HasCallStack, MonadIO m) => DBusSignalInfo -> m DBusSignalInfo

    gi-gio GI.Gio.Structs.DBusSignalInfo

    If info is statically allocated does nothing. Otherwise increases the reference count. Since: 2.26

  5. getDBusSignalInfoRefCount :: MonadIO m => DBusSignalInfo -> m Int32

    gi-gio GI.Gio.Structs.DBusSignalInfo

    Get the value of the “ref_count” field. When overloading is enabled, this is equivalent to

    get dBusSignalInfo #refCount
    

  6. setDBusSignalInfoRefCount :: MonadIO m => DBusSignalInfo -> Int32 -> m ()

    gi-gio GI.Gio.Structs.DBusSignalInfo

    Set the value of the “ref_count” field. When overloading is enabled, this is equivalent to

    set dBusSignalInfo [ #refCount := value ]
    

  7. linsertBefore :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)

    hedis Database.Redis

    No documentation available.

  8. pubSubForever :: Connection -> PubSubController -> IO () -> IO ()

    hedis Database.Redis

    Open a connection to the Redis server, register to all channels in the PubSubController, and process messages and subscription change requests forever. The only way this will ever exit is if there is an exception from the network code or an unhandled exception in a MessageCallback or PMessageCallback. For example, if the network connection to Redis dies, pubSubForever will throw a ConnectionLost. When such an exception is thrown, you can recall pubSubForever with the same PubSubController which will open a new connection and resubscribe to all the channels which are tracked in the PubSubController. The general pattern is therefore during program startup create a PubSubController and fork a thread which calls pubSubForever in a loop (using an exponential backoff algorithm such as the retry package to not hammer the Redis server if it does die). For example,

    myhandler :: ByteString -> IO ()
    myhandler msg = putStrLn $ unpack $ decodeUtf8 msg
    
    onInitialComplete :: IO ()
    onInitialComplete = putStrLn "Redis acknowledged that mychannel is now subscribed"
    
    main :: IO ()
    main = do
    conn <- connect defaultConnectInfo
    pubSubCtrl <- newPubSubController [("mychannel", myhandler)] []
    concurrently ( forever $
    pubSubForever conn pubSubCtrl onInitialComplete
    `catch` (\(e :: SomeException) -> do
    putStrLn $ "Got error: " ++ show e
    threadDelay $ 50*1000) -- TODO: use exponential backoff
    ) $ restOfYourProgram
    
    
    {- elsewhere in your program, use pubSubCtrl to change subscriptions -}
    
    At most one active pubSubForever can be running against a single PubSubController at any time. If two active calls to pubSubForever share a single PubSubController there will be deadlocks. If you do want to process messages using multiple connections to Redis, you can create more than one PubSubController. For example, create one PubSubController for each getNumCapabilities and then create a Haskell thread bound to each capability each calling pubSubForever in a loop. This will create one network connection per controller/capability and allow you to register separate channels and callbacks for each controller, spreading the load across the capabilities.

  9. xclaimForce :: XClaimOpts -> Bool

    hedis Database.Redis

    No documentation available.

  10. linsertBefore :: RedisCtx m f => ByteString -> ByteString -> ByteString -> m (f Integer)

    hedis Database.Redis.Sentinel

    No documentation available.

Page 571 of many | Previous | Next