nakadi-client-0.3.0.0: Client library for the Nakadi Event Broker

Copyright(c) Moritz Schulte 2017
LicenseBSD3
Maintainermtesseract@silverratio.net
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Network.Nakadi.Config

Description

This module implements support for creating and manipulating Nakadi client configurations.

Synopsis

Documentation

defaultRetryPolicy :: MonadIO m => RetryPolicyM m Source #

Default retry policy.

newConfig' Source #

Arguments

:: (MonadIO m, MonadThrow m) 
=> Manager

Manager Settings

-> ConsumeParameters

Consumption Parameters

-> Request

Request Template

-> m Config

Resulting Configuration

Producs a new configuration, with mandatory HTTP manager, default consumption parameters and HTTP request template.

newConfig Source #

Arguments

:: (MonadIO m, MonadThrow m) 
=> Maybe ManagerSettings

Optional ManagerSettings

-> Request

Request template for Nakadi requests

-> m Config

Resulting Configuration

Produce a new configuration, with optional HTTP manager settings and mandatory HTTP request template.

setRequestModifier :: (Request -> IO Request) -> Config -> Config Source #

Install a request modifier in the provided configuration. This can be used for e.g. including access tokens in HTTP requests to Nakadi.

setDeserializationFailureCallback :: (ByteString -> Text -> IO ()) -> Config -> Config Source #

Install a callback in the provided configuration to use in case of deserialization failures when consuming events.

setStreamConnectCallback :: StreamConnectCallback -> Config -> Config Source #

Install a callback in the provided configuration which is used after having successfully established a streaming Nakadi connection.

setLogFunc :: LogFunc -> Config -> Config Source #

Install a logger callback in the provided configuration.

setRetryPolicy :: RetryPolicyM IO -> Config -> Config Source #

Set a custom retry policy in the provided configuration.

defaultConsumeParameters :: ConsumeParameters Source #

Default parameters for event consumption.

setMaxUncommittedEvents :: Int32 -> ConsumeParameters -> ConsumeParameters Source #

Set maximum number of uncommitted events in the provided value of consumption parameters.

setBatchLimit :: Int32 -> ConsumeParameters -> ConsumeParameters Source #

Set batch limit in the provided value of consumption parameters.

setStreamLimit :: Int32 -> ConsumeParameters -> ConsumeParameters Source #

Set stream limit in the provided value of consumption parameters.

setBatchFlushTimeout :: Int32 -> ConsumeParameters -> ConsumeParameters Source #

Set batch-flush-timeout limit in the provided value of consumption parameters.

setStreamTimeout :: Int32 -> ConsumeParameters -> ConsumeParameters Source #

Set stream timeout in the provided value of consumption parameters.

setStreamKeepAliveLimit :: Int32 -> ConsumeParameters -> ConsumeParameters Source #

Set stream-keep-alive-limit in the provided value of consumption parameters.

setFlowId :: Text -> ConsumeParameters -> ConsumeParameters Source #

Set flow ID in the provided value of value of consumption parameters.