Open adrianfilip opened 1 year ago
I would like to work on this one.
🙏
Added a few guidelines.
@adrianfilip Hey! Could you please describe what kind of functionality we want to have for this connector?
In my current understanding, it is really two basic methods: fromStream
and toStream
(the naming could be different, of course).
@grouzen I think that covers the main use cases and would be enough for a first release.
@adrianfilip It is ready for review: https://github.com/zio/zio-connect/pull/101
Steps
[ ] Add a new project -- Example: https://github.com/zio/zio-connect/blob/2507925dcd9acf5cb1dbb5e004afef3982ad6807/build.sbt#L38
[ ] Create the following directory structure
[ ] Create the connector
sealed trait FS2Connector
case class LiveFS2Connector() extends FS2Connector { ... }
object LiveFS2Connector { val layer: ZLayer[???, ???, FS2Connector] = { ... LiveFS2Connector() }
}
[ ] 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 FS2ConnectorSpec 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 LiveFS2ConnectorSpec that runs the CassandraConnectorSpec files for the LiveCassandraConnector layer Example with testcontainers and S3 here - https://github.com/zio/zio-connect/pull/83/files#diff-e7e0899e455a741a644a05c0b26879d176a9126951477cd7c62dc19ade98b5cc
[ ] Provide a TestFS2Connector 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