Copyright | (c) Moritz Schulte 2017 |
---|---|
License | BSD3 |
Maintainer | mtesseract@silverratio.net |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Internal module containing HTTP client relevant code.
- module Network.HTTP.Simple
- module Network.HTTP.Types.Status
- type StreamConnectCallback = Maybe LogFunc -> Response () -> IO ()
- type HttpErrorCallback = Request -> HttpException -> RetryStatus -> Bool -> IO ()
- data Config = Config {
- _requestTemplate :: Request
- _requestModifier :: Request -> IO Request
- _manager :: Manager
- _consumeParameters :: ConsumeParameters
- _deserializationFailureCallback :: Maybe (ByteString -> Text -> IO ())
- _streamConnectCallback :: Maybe StreamConnectCallback
- _logFunc :: Maybe LogFunc
- _retryPolicy :: RetryPolicyM IO
- _http :: HttpBackend
- _httpErrorCallback :: Maybe HttpErrorCallback
- data HttpBackend = HttpBackend {
- _httpLbs :: Request -> IO (Response ByteString)
- _responseOpen :: Request -> Manager -> IO (Response BodyReader)
- _responseClose :: Response BodyReader -> IO ()
- data ConsumeParameters = ConsumeParameters {}
- data NakadiException
- = BatchPartiallySubmitted [BatchItemResponse]
- | BatchNotSubmitted [BatchItemResponse]
- | BatchValidationFailure [BatchItemResponse]
- | ClientNotAuthenticated Problem
- | AccessForbidden Problem
- | UnprocessableEntity Problem
- | Conflict Problem
- | DeserializationFailure ByteString
- | UnexpectedResponse (Response ())
- | NotFound Problem
- | TooManyRequests Problem
- | BadRequest Problem
- | SubscriptionNotFound Problem
- | CursorAlreadyCommitted CursorCommitResults
- | CursorResetInProgress Problem
- | EventTypeNotFound Problem
- | SubscriptionExistsAlready Subscription
- | RequestModificationException SomeException
- | CursorDistanceNoResult
- type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
- data Problem = Problem {}
- newtype CursorOffset = CursorOffset {}
- newtype EventTypeName = EventTypeName {}
- newtype PartitionName = PartitionName {}
- newtype CursorToken = CursorToken Text
- data Cursor = Cursor {}
- newtype ApplicationName = ApplicationName {}
- data SubscriptionCursor = SubscriptionCursor {}
- data SubscriptionCursorWithoutToken = SubscriptionCursorWithoutToken {}
- newtype SubscriptionCursorCommit = SubscriptionCursorCommit {
- _items :: [SubscriptionCursor]
- newtype CursorCommit = CursorCommit {}
- newtype SubscriptionId = SubscriptionId {}
- newtype StreamId = StreamId {
- unStreamId :: Text
- data SubscriptionEventStream = SubscriptionEventStream {}
- newtype Timestamp = Timestamp {}
- newtype FlowId = FlowId {}
- newtype EventId = EventId {}
- data Partition = Partition {}
- data ShiftedCursor = ShiftedCursor {}
- data CursorDistanceQuery = CursorDistanceQuery {}
- newtype CursorDistanceResult = CursorDistanceResult {}
- data SubscriptionPosition
- data Subscription = Subscription {}
- data PublishingStatus
- data Step
- data BatchItemResponse = BatchItemResponse {}
- newtype StreamKeepAliveLimit = StreamKeepAliveLimit {}
- newtype BatchFlushTimeout = BatchFlushTimeout {}
- data CursorCommitResultType
- data CursorCommitResult = CursorCommitResult {}
- newtype CursorCommitResults = CursorCommitResults {
- _items :: [CursorCommitResult]
- data SchemaType = SchemaTypeJson
- newtype SchemaVersion = SchemaVersion {}
- data EventTypeSchema = EventTypeSchema {}
- newtype PaginationLink = PaginationLink {}
- data PaginationLinks = PaginationLinks {}
- data EventTypeSchemasResponse = EventTypeSchemasResponse {}
- data SubscriptionsListResponse = SubscriptionsListResponse {
- _links :: PaginationLinks
- _items :: [Subscription]
- newtype Offset = Offset {}
- newtype Limit = Limit {}
- data PartitionState
- data PartitionStat = PartitionStat {}
- data SubscriptionEventTypeStats = SubscriptionEventTypeStats {}
- newtype SubscriptionEventTypeStatsResult = SubscriptionEventTypeStatsResult {}
- data EventTypeCategory
- data PartitionStrategy
- data EnrichmentStrategy = EnrichmentStrategyMetadata
- data CompatibilityMode
- newtype PartitionKeyField = PartitionKeyField {}
- data EventTypeStatistics = EventTypeStatistics {}
- data EventTypeOptions = EventTypeOptions {}
- data EventType = EventType {
- _name :: EventTypeName
- _owningApplication :: Maybe ApplicationName
- _category :: Maybe EventTypeCategory
- _enrichmentStrategies :: Maybe [EnrichmentStrategy]
- _partitionStrategy :: Maybe PartitionStrategy
- _compatibilityMode :: Maybe CompatibilityMode
- _schema :: EventTypeSchema
- _partitionKeyFields :: Maybe [PartitionKeyField]
- _defaultStatistic :: Maybe EventTypeStatistics
- _options :: Maybe EventTypeOptions
- data EventMetadata = EventMetadata {}
- data EventMetadataEnriched = EventMetadataEnriched {}
- data EventStreamBatch a = EventStreamBatch {}
- data SubscriptionEventStreamBatch a = SubscriptionEventStreamBatch {
- _cursor :: SubscriptionCursor
- _events :: Maybe (Vector a)
- data DataOp
- data DataChangeEvent a = DataChangeEvent {}
- data DataChangeEventEnriched a = DataChangeEventEnriched {}
- data SubscriptionEventStreamContext = SubscriptionEventStreamContext {}
- makeFieldRenamer :: [(String, String)] -> String -> String
- parseUUID :: String -> (UUID -> a) -> Value -> Parser a
- parseInteger :: (Integral i, Bounded i) => String -> (i -> a) -> Value -> Parser a
- type MonadNakadi m = (MonadIO m, MonadCatch m, MonadThrow m, MonadMask m)
- type MonadNakadiEnv r m = (MonadNakadi m, MonadReader r m, HasNakadiConfig r Config)
- class HasNakadiConfig s a
- httpJsonBody :: (MonadMask m, MonadIO m, FromJSON a) => Config -> Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m a
- httpJsonNoBody :: (MonadMask m, MonadIO m) => Config -> Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m ()
- httpJsonBodyStream :: (MonadMask m, MonadIO m, FromJSON a, MonadBaseControl IO m, MonadResource m) => Config -> Status -> (Response () -> Either Text b) -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m (b, ConduitM () a (ReaderT r m) ())
- errorClientNotAuthenticated :: MonadThrow m => ByteString -> m NakadiException
- errorUnprocessableEntity :: MonadThrow m => ByteString -> m NakadiException
- errorAccessForbidden :: MonadThrow m => ByteString -> m NakadiException
- errorTooManyRequests :: MonadThrow m => ByteString -> m NakadiException
- errorBadRequest :: MonadThrow m => ByteString -> m NakadiException
- errorSubscriptionNotFound :: MonadThrow m => ByteString -> m NakadiException
- errorCursorAlreadyCommitted :: MonadThrow m => ByteString -> m NakadiException
- errorCursorResetInProgress :: MonadThrow m => ByteString -> m NakadiException
- errorEventTypeNotFound :: MonadThrow m => ByteString -> m NakadiException
- errorSubscriptionExistsAlready :: MonadThrow m => ByteString -> m NakadiException
- errorBatchPartiallySubmitted :: MonadThrow m => ByteString -> m NakadiException
- errorBatchNotSubmitted :: MonadThrow m => ByteString -> m NakadiException
- setRequestQueryParameters :: [(ByteString, ByteString)] -> Request -> Request
Documentation
module Network.HTTP.Simple
module Network.HTTP.Types.Status
type HttpErrorCallback = Request -> HttpException -> RetryStatus -> Bool -> IO () Source #
Type synonym for user-provided callbacks which are used for HTTP Errror propagation.
HasNakadiRequestTemplate Config Request | |
HasNakadiManager Config Manager | |
HasNakadiHttp Config HttpBackend | |
HasNakadiConsumeParameters Config ConsumeParameters | |
HasNakadiCtxConfig SubscriptionEventStreamContext Config | |
HasNakadiStreamConnectCallback Config (Maybe StreamConnectCallback) | |
HasNakadiRetryPolicy Config (RetryPolicyM IO) | |
HasNakadiLogFunc Config (Maybe LogFunc) | |
HasNakadiHttpErrorCallback Config (Maybe HttpErrorCallback) | |
HasNakadiDeserializationFailureCallback Config (Maybe (ByteString -> Text -> IO ())) | |
HasNakadiRequestModifier Config (Request -> IO Request) | |
data HttpBackend Source #
Type encapsulating the HTTP backend functions used by this package. By default the corresponding functions from the http-client package are used. Useful, for e.g., testing.
HttpBackend | |
|
HasNakadiHttp Config HttpBackend | |
HasNakadiResponseOpen HttpBackend (Request -> Manager -> IO (Response BodyReader)) | |
HasNakadiResponseClose HttpBackend (Response BodyReader -> IO ()) | |
HasNakadiHttpLbs HttpBackend (Request -> IO (Response ByteString)) | |
data ConsumeParameters Source #
ConsumeParameters
Eq ConsumeParameters Source # | |
Ord ConsumeParameters Source # | |
Show ConsumeParameters Source # | |
HasNakadiConsumeParameters Config ConsumeParameters | |
HasNakadiFlowId ConsumeParameters (Maybe Text) | |
HasNakadiStreamTimeout ConsumeParameters (Maybe Int32) | |
HasNakadiStreamLimit ConsumeParameters (Maybe Int32) | |
HasNakadiStreamKeepAliveLimit ConsumeParameters (Maybe Int32) | |
HasNakadiMaxUncommittedEvents ConsumeParameters (Maybe Int32) | |
HasNakadiBatchLimit ConsumeParameters (Maybe Int32) | |
HasNakadiBatchFlushTimeout ConsumeParameters (Maybe Int32) | |
data NakadiException Source #
type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO () Source #
Type of a logger callback provided to nakadi-client for logging purposes.
Type for RFC7807 Problem
objects.
Problem | |
|
newtype CursorOffset Source #
Type for cursor offsets.
CursorOffset | |
|
Eq CursorOffset Source # | |
Ord CursorOffset Source # | |
Show CursorOffset Source # | |
IsString CursorOffset Source # | |
Generic CursorOffset Source # | |
Hashable CursorOffset Source # | |
ToJSON CursorOffset Source # | |
FromJSON CursorOffset Source # | |
HasNakadiOffset Cursor CursorOffset | |
HasNakadiOldestAvailableOffset Partition CursorOffset | |
HasNakadiNewestAvailableOffset Partition CursorOffset | |
type Rep CursorOffset Source # | |
newtype EventTypeName Source #
Type for event type names.
EventTypeName | |
|
Eq EventTypeName Source # | |
Ord EventTypeName Source # | |
Show EventTypeName Source # | |
IsString EventTypeName Source # | |
Generic EventTypeName Source # | |
Hashable EventTypeName Source # | |
ToJSON EventTypeName Source # | |
FromJSON EventTypeName Source # | |
HasNakadiEventType EventMetadataEnriched EventTypeName | |
HasNakadiName EventType EventTypeName | |
HasNakadiEventTypes Subscription [EventTypeName] | |
type Rep EventTypeName Source # | |
newtype PartitionName Source #
Type for partition names.
PartitionName | |
|
Eq PartitionName Source # | |
Ord PartitionName Source # | |
Show PartitionName Source # | |
IsString PartitionName Source # | |
Generic PartitionName Source # | |
Hashable PartitionName Source # | |
ToJSON PartitionName Source # | |
FromJSON PartitionName Source # | |
HasNakadiPartition Cursor PartitionName | |
HasNakadiPartition Partition PartitionName | |
HasNakadiPartition EventMetadata (Maybe PartitionName) | |
HasNakadiPartition EventMetadataEnriched (Maybe PartitionName) | |
type Rep PartitionName Source # | |
newtype CursorToken Source #
Type for cursor tokens.
Type for cursors.
Eq Cursor Source # | |
Ord Cursor Source # | |
Show Cursor Source # | |
Generic Cursor Source # | |
Hashable Cursor Source # | |
ToJSON Cursor Source # | |
FromJSON Cursor Source # | |
HasNakadiPartition Cursor PartitionName | |
HasNakadiOffset Cursor CursorOffset | |
HasNakadiInitialCursor CursorDistanceQuery Cursor | |
HasNakadiFinalCursor CursorDistanceQuery Cursor | |
HasNakadiItems CursorCommit [Cursor] | |
HasNakadiCursor (EventStreamBatch a) Cursor | |
type Rep Cursor Source # | |
newtype ApplicationName Source #
Type for application names.
Eq ApplicationName Source # | |
Ord ApplicationName Source # | |
Show ApplicationName Source # | |
IsString ApplicationName Source # | |
Generic ApplicationName Source # | |
Hashable ApplicationName Source # | |
ToJSON ApplicationName Source # | |
FromJSON ApplicationName Source # | |
HasNakadiOwningApplication Subscription ApplicationName | |
HasNakadiOwningApplication EventType (Maybe ApplicationName) | |
type Rep ApplicationName Source # | |
data SubscriptionCursor Source #
Type fo rsubscription cursors.
SubscriptionCursor | |
|
Eq SubscriptionCursor Source # | |
Ord SubscriptionCursor Source # | |
Show SubscriptionCursor Source # | |
Generic SubscriptionCursor Source # | |
ToJSON SubscriptionCursor Source # | |
FromJSON SubscriptionCursor Source # | |
HasNakadiSubscriptionCursor SubscriptionCursor | |
HasNakadiItems SubscriptionCursorCommit [SubscriptionCursor] | |
HasNakadiCursor (SubscriptionEventStreamBatch a) SubscriptionCursor | |
type Rep SubscriptionCursor Source # | |
data SubscriptionCursorWithoutToken Source #
Type for subscription cursors without token.
SubscriptionCursorWithoutToken | |
|
newtype SubscriptionCursorCommit Source #
Type for commit object for subscription cursor committing.
SubscriptionCursorCommit | |
|
newtype CursorCommit Source #
Type for commit objects for cursor committing.
Show CursorCommit Source # | |
Generic CursorCommit Source # | |
ToJSON CursorCommit Source # | |
FromJSON CursorCommit Source # | |
HasNakadiItems CursorCommit [Cursor] | |
type Rep CursorCommit Source # | |
newtype SubscriptionId Source #
Type for subscription IDs.
SubscriptionId | |
|
Eq SubscriptionId Source # | |
Ord SubscriptionId Source # | |
Show SubscriptionId Source # | |
Generic SubscriptionId Source # | |
Hashable SubscriptionId Source # | |
ToJSON SubscriptionId Source # | |
FromJSON SubscriptionId Source # | |
HasNakadiSubscriptionId SubscriptionEventStream SubscriptionId | |
HasNakadiSubscriptionId SubscriptionEventStreamContext SubscriptionId | |
HasNakadiId SubscriptionId UUID | |
HasNakadiId Subscription (Maybe SubscriptionId) | |
type Rep SubscriptionId Source # | |
Type for stream IDs.
StreamId | |
|
Eq StreamId Source # | |
Ord StreamId Source # | |
Show StreamId Source # | |
Generic StreamId Source # | |
ToJSON StreamId Source # | |
FromJSON StreamId Source # | |
HasNakadiStreamId SubscriptionEventStream StreamId | |
HasNakadiStreamId SubscriptionEventStreamContext StreamId | |
HasNakadiId StreamId Text | |
type Rep StreamId Source # | |
data SubscriptionEventStream Source #
SubscriptionEventStream
Show SubscriptionEventStream Source # | |
HasNakadiSubscriptionId SubscriptionEventStream SubscriptionId | |
HasNakadiStreamId SubscriptionEventStream StreamId | |
Type for timestamps.
Timestamp | |
|
Eq Timestamp Source # | |
Ord Timestamp Source # | |
Show Timestamp Source # | |
Generic Timestamp Source # | |
Hashable Timestamp Source # | |
ToJSON Timestamp Source # | |
FromJSON Timestamp Source # | |
HasNakadiOccurredAt EventMetadata Timestamp | |
HasNakadiOccurredAt EventMetadataEnriched Timestamp | |
HasNakadiReceivedAt EventMetadataEnriched Timestamp | |
HasNakadiUTCTime Timestamp UTCTime | |
HasNakadiCreatedAt Subscription (Maybe Timestamp) | |
HasNakadiCreatedAt EventTypeSchema (Maybe Timestamp) | |
type Rep Timestamp Source # | |
A Flow ID.
ID of an Event
Eq EventId Source # | |
Ord EventId Source # | |
Show EventId Source # | |
Generic EventId Source # | |
Hashable EventId Source # | |
ToJSON EventId Source # | |
FromJSON EventId Source # | |
HasNakadiEid EventMetadata EventId | |
HasNakadiEid EventMetadataEnriched EventId | |
HasNakadiId EventId UUID | |
HasNakadiParentEids EventMetadata (Maybe [EventId]) | |
HasNakadiParentEids EventMetadataEnriched (Maybe [EventId]) | |
type Rep EventId Source # | |
Partition Data
Partition | |
|
data ShiftedCursor Source #
Type for shift-cursor queries.
ShiftedCursor | |
|
data CursorDistanceQuery Source #
Type for cursor-distance queries. Represents the request to compute the distance between initial cursor and final cursor.
CursorDistanceQuery | |
|
Eq CursorDistanceQuery Source # | |
Ord CursorDistanceQuery Source # | |
Show CursorDistanceQuery Source # | |
Generic CursorDistanceQuery Source # | |
Hashable CursorDistanceQuery Source # | |
ToJSON CursorDistanceQuery Source # | |
FromJSON CursorDistanceQuery Source # | |
HasNakadiInitialCursor CursorDistanceQuery Cursor | |
HasNakadiFinalCursor CursorDistanceQuery Cursor | |
type Rep CursorDistanceQuery Source # | |
newtype CursorDistanceResult Source #
Type for results of cursor-distance-queries.
data SubscriptionPosition Source #
Type for subscription positions.
data Subscription Source #
Type for a Subscription.
Eq Subscription Source # | |
Ord Subscription Source # | |
Show Subscription Source # | |
Generic Subscription Source # | |
Hashable Subscription Source # | |
ToJSON Subscription Source # | |
FromJSON Subscription Source # | |
HasNakadiOwningApplication Subscription ApplicationName | |
HasNakadiCreatedAt Subscription (Maybe Timestamp) | |
HasNakadiItems SubscriptionsListResponse [Subscription] | |
HasNakadiReadFrom Subscription (Maybe SubscriptionPosition) | |
HasNakadiInitialCursors Subscription (Maybe [SubscriptionCursorWithoutToken]) | |
HasNakadiId Subscription (Maybe SubscriptionId) | |
HasNakadiEventTypes Subscription [EventTypeName] | |
HasNakadiConsumerGroup Subscription (Maybe Text) | |
type Rep Subscription Source # | |
data PublishingStatus Source #
Type for publishing status.
Step
data BatchItemResponse Source #
In case of failures during batch publishing, Nakadi returns detailed information about which events failed to be published. This per-event information is a batch item response.
newtype StreamKeepAliveLimit Source #
StreamKeepAliveLimit
newtype BatchFlushTimeout Source #
BatchFlushTimeout
data CursorCommitResultType Source #
CursorCommitResultType
data CursorCommitResult Source #
CursorCommitResult
newtype CursorCommitResults Source #
data SchemaType Source #
SchemaType
Eq SchemaType Source # | |
Ord SchemaType Source # | |
Show SchemaType Source # | |
Generic SchemaType Source # | |
Hashable SchemaType Source # | |
ToJSON SchemaType Source # | |
FromJSON SchemaType Source # | |
HasNakadiSchemaType EventTypeSchema SchemaType | |
type Rep SchemaType Source # | |
newtype SchemaVersion Source #
Type for the version of a schema.
Eq SchemaVersion Source # | |
Ord SchemaVersion Source # | |
Show SchemaVersion Source # | |
IsString SchemaVersion Source # | |
Generic SchemaVersion Source # | |
Hashable SchemaVersion Source # | |
ToJSON SchemaVersion Source # | |
FromJSON SchemaVersion Source # | |
HasNakadiVersion EventMetadataEnriched SchemaVersion | |
HasNakadiVersion EventTypeSchema (Maybe SchemaVersion) | |
type Rep SchemaVersion Source # | |
data EventTypeSchema Source #
Type for the schema of an event type.
EventTypeSchema | |
|
Eq EventTypeSchema Source # | |
Ord EventTypeSchema Source # | |
Show EventTypeSchema Source # | |
Generic EventTypeSchema Source # | |
Hashable EventTypeSchema Source # | |
ToJSON EventTypeSchema Source # | |
FromJSON EventTypeSchema Source # | |
HasNakadiSchemaType EventTypeSchema SchemaType | |
HasNakadiSchema EventTypeSchema Text | |
HasNakadiSchema EventType EventTypeSchema | |
HasNakadiVersion EventTypeSchema (Maybe SchemaVersion) | |
HasNakadiCreatedAt EventTypeSchema (Maybe Timestamp) | |
HasNakadiItems EventTypeSchemasResponse [EventTypeSchema] | |
type Rep EventTypeSchema Source # | |
newtype PaginationLink Source #
PaginationLink
Eq PaginationLink Source # | |
Ord PaginationLink Source # | |
Show PaginationLink Source # | |
Generic PaginationLink Source # | |
Hashable PaginationLink Source # | |
ToJSON PaginationLink Source # | |
FromJSON PaginationLink Source # | |
HasNakadiHref PaginationLink Text | |
HasNakadiPrev PaginationLinks (Maybe PaginationLink) | |
HasNakadiNext PaginationLinks (Maybe PaginationLink) | |
type Rep PaginationLink Source # | |
data PaginationLinks Source #
PaginationLinks
Eq PaginationLinks Source # | |
Ord PaginationLinks Source # | |
Show PaginationLinks Source # | |
Generic PaginationLinks Source # | |
Hashable PaginationLinks Source # | |
ToJSON PaginationLinks Source # | |
FromJSON PaginationLinks Source # | |
HasNakadiLinks EventTypeSchemasResponse PaginationLinks | |
HasNakadiLinks SubscriptionsListResponse PaginationLinks | |
HasNakadiPrev PaginationLinks (Maybe PaginationLink) | |
HasNakadiNext PaginationLinks (Maybe PaginationLink) | |
type Rep PaginationLinks Source # | |
data EventTypeSchemasResponse Source #
EventTypeSchemasResponse
data SubscriptionsListResponse Source #
SubscriptionsListResponse
Type for offset values.
Type for limit values.
data PartitionState Source #
Type for partition states.
data SubscriptionEventTypeStats Source #
Nakadi type SubscriptionEventTypeStats
.
newtype SubscriptionEventTypeStatsResult Source #
SubscriptionEventTypeStatsResult
data EventTypeCategory Source #
Type for the category of an EventType
.
data PartitionStrategy Source #
Type for a partitioning strategy.
data EnrichmentStrategy Source #
Type for an enrichment stragey.
Eq EnrichmentStrategy Source # | |
Ord EnrichmentStrategy Source # | |
Show EnrichmentStrategy Source # | |
Generic EnrichmentStrategy Source # | |
Hashable EnrichmentStrategy Source # | |
ToJSON EnrichmentStrategy Source # | |
FromJSON EnrichmentStrategy Source # | |
HasNakadiEnrichmentStrategies EventType (Maybe [EnrichmentStrategy]) | |
type Rep EnrichmentStrategy Source # | |
data CompatibilityMode Source #
Type for an event type compatibility mode.
Eq CompatibilityMode Source # | |
Ord CompatibilityMode Source # | |
Show CompatibilityMode Source # | |
Generic CompatibilityMode Source # | |
Hashable CompatibilityMode Source # | |
ToJSON CompatibilityMode Source # | |
FromJSON CompatibilityMode Source # | |
HasNakadiCompatibilityMode EventType (Maybe CompatibilityMode) | |
type Rep CompatibilityMode Source # | |
newtype PartitionKeyField Source #
Type for a partitioning key field.
Eq PartitionKeyField Source # | |
Ord PartitionKeyField Source # | |
Show PartitionKeyField Source # | |
IsString PartitionKeyField Source # | |
Generic PartitionKeyField Source # | |
Hashable PartitionKeyField Source # | |
ToJSON PartitionKeyField Source # | |
FromJSON PartitionKeyField Source # | |
HasNakadiPartitionKeyFields EventType (Maybe [PartitionKeyField]) | |
type Rep PartitionKeyField Source # | |
data EventTypeStatistics Source #
Type for event type statistics.
data EventTypeOptions Source #
Type for event type options.
EventType
Eq EventType Source # | |
Ord EventType Source # | |
Show EventType Source # | |
Generic EventType Source # | |
Hashable EventType Source # | |
ToJSON EventType Source # | |
FromJSON EventType Source # | |
HasNakadiSchema EventType EventTypeSchema | |
HasNakadiName EventType EventTypeName | |
HasNakadiPartitionStrategy EventType (Maybe PartitionStrategy) | |
HasNakadiPartitionKeyFields EventType (Maybe [PartitionKeyField]) | |
HasNakadiOwningApplication EventType (Maybe ApplicationName) | |
HasNakadiOptions EventType (Maybe EventTypeOptions) | |
HasNakadiEnrichmentStrategies EventType (Maybe [EnrichmentStrategy]) | |
HasNakadiDefaultStatistic EventType (Maybe EventTypeStatistics) | |
HasNakadiCompatibilityMode EventType (Maybe CompatibilityMode) | |
HasNakadiCategory EventType (Maybe EventTypeCategory) | |
type Rep EventType Source # | |
data EventMetadata Source #
Type of published event metadata values.
EventMetadata | |
|
Eq EventMetadata Source # | |
Show EventMetadata Source # | |
Generic EventMetadata Source # | |
ToJSON EventMetadata Source # | |
FromJSON EventMetadata Source # | |
HasNakadiOccurredAt EventMetadata Timestamp | |
HasNakadiEid EventMetadata EventId | |
HasNakadiPartition EventMetadata (Maybe PartitionName) | |
HasNakadiParentEids EventMetadata (Maybe [EventId]) | |
type Rep EventMetadata Source # | |
data EventMetadataEnriched Source #
Type of event metadata enriched by Nakadi
Eq EventMetadataEnriched Source # | |
Show EventMetadataEnriched Source # | |
Generic EventMetadataEnriched Source # | |
ToJSON EventMetadataEnriched Source # | |
FromJSON EventMetadataEnriched Source # | |
HasNakadiOccurredAt EventMetadataEnriched Timestamp | |
HasNakadiEid EventMetadataEnriched EventId | |
HasNakadiVersion EventMetadataEnriched SchemaVersion | |
HasNakadiReceivedAt EventMetadataEnriched Timestamp | |
HasNakadiEventType EventMetadataEnriched EventTypeName | |
HasNakadiPartition EventMetadataEnriched (Maybe PartitionName) | |
HasNakadiParentEids EventMetadataEnriched (Maybe [EventId]) | |
HasNakadiFlowId EventMetadataEnriched (Maybe FlowId) | |
type Rep EventMetadataEnriched Source # | |
data EventStreamBatch a Source #
EventStreamBatch
Show a => Show (EventStreamBatch a) Source # | |
Generic (EventStreamBatch a) Source # | |
ToJSON a => ToJSON (EventStreamBatch a) Source # | |
FromJSON a => FromJSON (EventStreamBatch a) Source # | |
HasNakadiCursor (EventStreamBatch a) Cursor | |
HasNakadiEvents (EventStreamBatch a) (Maybe (Vector a)) | |
type Rep (EventStreamBatch a) Source # | |
data SubscriptionEventStreamBatch a Source #
SubscriptionEventStreamBatch
SubscriptionEventStreamBatch | |
|
Show a => Show (SubscriptionEventStreamBatch a) Source # | |
Generic (SubscriptionEventStreamBatch a) Source # | |
ToJSON a => ToJSON (SubscriptionEventStreamBatch a) Source # | |
FromJSON a => FromJSON (SubscriptionEventStreamBatch a) Source # | |
HasNakadiSubscriptionCursor (SubscriptionEventStreamBatch a) | |
HasNakadiCursor (SubscriptionEventStreamBatch a) SubscriptionCursor | |
HasNakadiEvents (SubscriptionEventStreamBatch a) (Maybe (Vector a)) | |
type Rep (SubscriptionEventStreamBatch a) Source # | |
Type for "data_op" as contained in the DataChangeEvent.
data DataChangeEvent a Source #
DataChangeEvent
Eq a => Eq (DataChangeEvent a) Source # | |
Show a => Show (DataChangeEvent a) Source # | |
Generic (DataChangeEvent a) Source # | |
ToJSON a => ToJSON (DataChangeEvent a) Source # | |
FromJSON a => FromJSON (DataChangeEvent a) Source # | |
type Rep (DataChangeEvent a) Source # | |
data DataChangeEventEnriched a Source #
A DataChangeEvent enriched by Nakadi
Eq a => Eq (DataChangeEventEnriched a) Source # | |
Show a => Show (DataChangeEventEnriched a) Source # | |
Generic (DataChangeEventEnriched a) Source # | |
ToJSON a => ToJSON (DataChangeEventEnriched a) Source # | |
FromJSON a => FromJSON (DataChangeEventEnriched a) Source # | |
type Rep (DataChangeEventEnriched a) Source # | |
data SubscriptionEventStreamContext Source #
This context is required in the environment for running a subscription. It is managed by the library, not by the user.
HasNakadiSubscriptionId SubscriptionEventStreamContext SubscriptionId | |
HasNakadiStreamId SubscriptionEventStreamContext StreamId | |
HasNakadiCtxConfig SubscriptionEventStreamContext Config | |
makeFieldRenamer :: [(String, String)] -> String -> String Source #
Construct a field renamer function from a field renamer map.
type MonadNakadi m = (MonadIO m, MonadCatch m, MonadThrow m, MonadMask m) Source #
Type constraint synonym for encapsulating the monad constraints required by most funtions in this package.
type MonadNakadiEnv r m = (MonadNakadi m, MonadReader r m, HasNakadiConfig r Config) Source #
Type constraint synonym for encapsulating the monad constraints
required by most funtions in this package. Reader Monad version,
expects a Config
to be available in the current reader
environment.
class HasNakadiConfig s a Source #
httpJsonBody :: (MonadMask m, MonadIO m, FromJSON a) => Config -> Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m a Source #
httpJsonNoBody :: (MonadMask m, MonadIO m) => Config -> Status -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m () Source #
httpJsonBodyStream :: (MonadMask m, MonadIO m, FromJSON a, MonadBaseControl IO m, MonadResource m) => Config -> Status -> (Response () -> Either Text b) -> [(Status, ByteString -> m NakadiException)] -> (Request -> Request) -> m (b, ConduitM () a (ReaderT r m) ()) Source #
errorClientNotAuthenticated :: MonadThrow m => ByteString -> m NakadiException Source #
errorUnprocessableEntity :: MonadThrow m => ByteString -> m NakadiException Source #
errorAccessForbidden :: MonadThrow m => ByteString -> m NakadiException Source #
errorTooManyRequests :: MonadThrow m => ByteString -> m NakadiException Source #
errorBadRequest :: MonadThrow m => ByteString -> m NakadiException Source #
errorSubscriptionNotFound :: MonadThrow m => ByteString -> m NakadiException Source #
errorCursorAlreadyCommitted :: MonadThrow m => ByteString -> m NakadiException Source #
errorCursorResetInProgress :: MonadThrow m => ByteString -> m NakadiException Source #
errorEventTypeNotFound :: MonadThrow m => ByteString -> m NakadiException Source #
errorSubscriptionExistsAlready :: MonadThrow m => ByteString -> m NakadiException Source #
errorBatchPartiallySubmitted :: MonadThrow m => ByteString -> m NakadiException Source #
errorBatchNotSubmitted :: MonadThrow m => ByteString -> m NakadiException Source #
setRequestQueryParameters :: [(ByteString, ByteString)] -> Request -> Request Source #