Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add processor template documentation #165

Merged
merged 9 commits into from
Nov 14, 2024
44 changes: 44 additions & 0 deletions docs/processors/standalone/conduit-processor-template.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "Conduit Processor Template"
sidebar_position: 1
---

## Initializing a Conduit Processor Project

To begin the development of a custom Conduit processor, it is recommended developers should initialize their project using the [Conduit processor template](https://github.com/ConduitIO/conduit-processor-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 Processor Template are:

- Base code for processor's config and lifecycle.
AdamHaffar marked this conversation as resolved.
Show resolved Hide resolved
- Sample unit tests to validate processor 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 Processor Template
### Steps to Use the Processor Template
AdamHaffar marked this conversation as resolved.
Show resolved Hide resolved

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-processor-file`.
5. (Optional) Define code owners in the `CODEOWNERS` file.

:::note

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

:::

## Developing Processors

Implement a processor by defining a struct that satisfies the [sdk.Processor](<https://pkg.go.dev/github.com/conduitio/conduit-processor-sdk#Processor) interface.

Processors follow a lifecycle of: Configure, Open, Process, and Teardown, However a simple processor can be created with only Specification and Process being overridden. There are other optional functions that help with the configuration of more complex processors such as: Configure, Open, Teardown and MiddlewareOptions.

Further information on developing a processor can be found at the following link(s):

- [Build you own](/docs/processors/standalone/building.mdx)
- [How it works](/docs/processors/standalone/how-it-works.mdx)
AdamHaffar marked this conversation as resolved.
Show resolved Hide resolved