packages feed

hw-kafka-client-2.1.2: hw-kafka-client.cabal

name:                hw-kafka-client
version:             2.1.2
homepage:            https://github.com/haskell-works/hw-kafka-client
bug-reports:         https://github.com/haskell-works/hw-kafka-client/issues
license:             MIT
license-file:        LICENSE
author:              Alexey Raga <alexey.raga@gmail.com>
maintainer:          Alexey Raga <alexey.raga@gmail.com>
category:            Database
build-type:          Simple
cabal-version:       >=1.10
synopsis:            Kafka bindings for Haskell
description:         Apache Kafka bindings backed by the librdkafka C library.
  .
  Features include:
  .
  * Consumer groups: auto-rebalancing consumers
  .
  * Keyed and keyless messages producing/consuming
  .
  * Batch producing messages


extra-source-files:   README.md

flag examples
  default: False
  manual: True
  description: Also compile examples

source-repository head
  type:     git
  location: git://github.com/haskell-works/hw-kafka-client.git

executable kafka-client-example
  main-is:             Main.hs
  other-modules:       ConsumerExample
                     , ProducerExample
  hs-source-dirs:      example
  default-language:    Haskell2010
  build-depends:       base >=4.6 && < 5
                     , bifunctors
                     , bytestring
                     , containers
                     , temporary
                     , transformers
                     , unix
                     , hw-kafka-client

  if flag(examples)
    buildable: True
  else
    buildable: False

library
  Build-tools:       c2hs
  build-depends:       base >=4.6 && < 5
                     , bifunctors
                     , bytestring
                     , containers
                     , temporary
                     , transformers
                     , unix
  if impl(ghc < 8.0)
    build-depends: semigroups

  exposed-modules:
    Kafka.Consumer
    Kafka.Consumer.ConsumerProperties
    Kafka.Consumer.Subscription
    Kafka.Consumer.Types
    Kafka.Dump
    Kafka.Metadata
    Kafka.Producer
    Kafka.Producer.ProducerProperties
    Kafka.Producer.Types
    Kafka.Types
  other-modules:
    Kafka.Callbacks
    Kafka.Consumer.Callbacks
    Kafka.Consumer.Convert
    Kafka.Internal.CancellationToken
    Kafka.Internal.RdKafka
    Kafka.Internal.Setup
    Kafka.Internal.Shared
    Kafka.Producer.Convert
  hs-source-dirs:      src
  default-language:    Haskell2010
  ghc-options:         -Wall
  extra-libraries:     rdkafka
  if os(darwin)
    cpp-options: -D__attribute__(A)= -D_Nullable= -D_Nonnull=

test-suite tests
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      tests
  other-modules:       Kafka.Consumer.ConsumerRecordMapSpec
                     , Kafka.Consumer.ConsumerRecordTraverseSpec
  main-is:             Spec.hs
  ghc-options:         -Wall -threaded
  build-depends:       base >=4.6 && < 5
                     , bifunctors
                     , bytestring
                     , containers
                     , hw-kafka-client
                     , monad-loops
                     , hspec
                     , regex-posix
                     , either

test-suite integration-tests
  type:                exitcode-stdio-1.0
  default-language:    Haskell2010
  hs-source-dirs:      tests-it
  other-modules:       Kafka.IntegrationSpec
                     , Kafka.TestEnv
  main-is:             Spec.hs
  ghc-options:         -Wall -threaded
  build-depends:       base >=4.6 && < 5
                     , bifunctors
                     , bytestring
                     , containers
                     , hw-kafka-client
                     , monad-loops
                     , hspec
                     , regex-posix
                     , either