Skip to main content

Conduit Connector Template

Initializing a Conduit Connector Project

To begin the development of a custom Conduit connector, it is recommended developers should initialize their project using the Conduit connector template. This template streamlines the setup process by providing a fundamental project structure, along with utility configurations for GitHub actions and a Makefile.

Included in the Conduit Connector Template are:

  • Base code for configuring the connector's source and destination.
  • Sample unit tests to validate connector functionality.
  • A preconfigured Makefile to assist with common build tasks.
  • GitHub Actions Workflows for continuous integration including building, testing, linting, and automated release creation upon tag push.
  • Dependabot configurations to automate dependency updates and minor version auto-merging.
  • Issue and Pull Request templates for consistent contribution practices.
  • A README template to guide project documentation.

Steps to Use the Connector Template

  1. On the repository's main page, select "Use this template".
  2. Provide the new repository details as prompted.
  3. Upon repository creation, clone it to your local development environment.
  4. Execute the ./setup.sh script with the desired module name, e.g., ./setup.sh github.com/awesome-org/conduit-connector-file.
  5. (Optional) Define code owners in the CODEOWNERS file.
note

By convention the name of the repository should be conduit-connector-[connector name]. So if you would like to reference the connector using foo, the repository should be named conduit-connector-foo.

Developing Connectors

A Conduit Connector can serve as a source, destination, or both. Implement a source connector by defining a struct that satisfies the sdk.Source interface, or create a destination connector by creating a struct that satisfies sdk.Destination.

Both types of connectors follow a similar lifecycle which is: configure, open connection, read/write records, and teardown. There are other auxiliary functions that help with configuration that are autogenerated when using the Conduit Connector template.

Further information on developing a Source or Destination connector can be found at the following links:

scarf pixel conduit-site-docs-developing-connectors