zio-connect icon indicating copy to clipboard operation
zio-connect copied to clipboard

KinesisDatastreamsConnector - new connector

Open adrianfilip opened this issue 2 years ago • 1 comments

#Steps

  • [ ] Add a new project -- Example: https://github.com/zio/zio-connect/blob/2507925dcd9acf5cb1dbb5e004afef3982ad6807/build.sbt#L38

  • [ ] Create the following directory structure

       zio.connect.firehose
    
  • [ ] Create the connector

     sealed trait FirehoseConnector
    
     case class LiveFirehoseConnector() extends FirehoseConnector { ... }
    
     object LiveFirehoseConnector {
         val layer: ZLayer[???, ???, FirehoseConnector] = {
             ...
             LiveFirehoseConnector()
         }
    
     }
    
  • [ ] Provide accessors in the package object Example: https://github.com/zio/zio-connect/blob/master/connectors/file-connector/src/main/scala/zio/connect/file/package.scala

  • [ ] Tests belong in the FirehoseConnectorSpec file. They use the accessors. Example:- https://github.com/zio/zio-connect/blob/master/connectors/file-connector/src/test/scala/zio/connect/file/FileConnectorSpec.scala

  • [ ] There will be a LiveFirehoseConnectorSpec that runs the FirehoseConnectorSpec files for the LiveFirehoseConnector layer You can use firehose with localstack testcontainers. Example with testcontainers and S3 here - https://github.com/zio/zio-connect/pull/83/files#diff-e7e0899e455a741a644a05c0b26879d176a9126951477cd7c62dc19ade98b5cc

  • [ ] Provide a TestFirehoseConnector layer that allows testing with a stub. Example - https://github.com/zio/zio-connect/blob/master/connectors/file-connector/src/main/scala/zio/connect/file/TestFileConnector.scala

adrianfilip avatar Oct 04 '22 21:10 adrianfilip

The current version has the issue mentioned here: - https://stackoverflow.com/questions/67718747/resourcenotfoundexception-stream-not-found-under-account

Maybe it's worth checking https://github.com/svroonland/zio-kinesis/blob/master/core/src/main/scala/nl/vroste/zio/kinesis/client/localstack/LocalStackServices.scala also

adrianfilip avatar Nov 18 '22 22:11 adrianfilip