1"use strict";(self.webpackChunkconduit_site=self.webpackChunkconduit_site||[]).push([[6838],{24972:(e,o,s)=>{s.r(o),s.d(o,{assets:()=>l,contentTitle:()=>c,default:()=>p,frontMatter:()=>r,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"developing/processors/conduit-processor-template","title":"Conduit Processor Template","description":"Initializing a Conduit Processor Project","source":"@site/docs/2-developing/1-processors/0-conduit-processor-template.mdx","sourceDirName":"2-developing/1-processors","slug":"/developing/processors/conduit-processor-template","permalink":"/docs/developing/processors/conduit-processor-template","draft":false,"unlisted":false,"editUrl":"https://github.com/conduitio/conduitio.github.io/edit/main/docs/2-developing/1-processors/0-conduit-processor-template.mdx","tags":[],"version":"current","lastUpdatedAt":1731579749000,"sidebarPosition":0,"frontMatter":{"title":"Conduit Processor Template"},"sidebar":"docsSidebar","previous":{"title":"Guidelines for writing a processor","permalink":"/docs/developing/processors/"},"next":{"title":"Build your own","permalink":"/docs/developing/processors/building"}}');var i=s(74848),t=s(28453);const r={title:"Conduit Processor Template"},c=void 0,l={},d=[{value:"Initializing a Conduit Processor Project",id:"initializing-a-conduit-processor-project",level:2},{value:"Steps to Use the Processor Template",id:"steps-to-use-the-processor-template",level:3},{value:"Developing Processors",id:"developing-processors",level:2}];function a(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.h2,{id:"initializing-a-conduit-processor-project",children:"Initializing a Conduit Processor Project"}),"\n",(0,i.jsxs)(o.p,{children:["To begin the development of a custom Conduit processor, it is recommended developers should initialize their project using the ",(0,i.jsx)(o.a,{href:"https://github.com/ConduitIO/conduit-processor-template",children:"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."]}),"\n",(0,i.jsx)(o.p,{children:"Included in the Conduit Processor Template are:"}),"\n",(0,i.jsxs)(o.ul,{children:["\n",(0,i.jsx)(o.li,{children:"Base code for processor's configuration and lifecycle."}),"\n",(0,i.jsx)(o.li,{children:"Sample unit tests to validate processor functionality."}),"\n",(0,i.jsx)(o.li,{children:"A preconfigured Makefile to assist with common build tasks."}),"\n",(0,i.jsx)(o.li,{children:"GitHub Actions Workflows for continuous integration including building, testing, linting, and automated release creation upon tag push."}),"\n",(0,i.jsx)(o.li,{children:"Dependabot configurations to automate dependency updates and minor version auto-merging."}),"\n",(0,i.jsx)(o.li,{children:"Issue and Pull Request templates for consistent contribution practices."}),"\n",(0,i.jsx)(o.li,{children:"A README template to guide project documentation."}),"\n"]}),"\n",(0,i.jsx)(o.h3,{id:"steps-to-use-the-processor-template",children:"Steps to Use the Processor Template"}),"\n",(0,i.jsxs)(o.ol,{children:["\n",(0,i.jsx)(o.li,{children:'On the repository\'s main page, select "Use this template".'}),"\n",(0,i.jsx)(o.li,{children:"Provide the new repository details as prompted."}),"\n",(0,i.jsx)(o.li,{children:"Upon repository creation, clone it to your local development environment."}),"\n",(0,i.jsxs)(o.li,{children:["Execute the ",(0,i.jsx)(o.code,{children:"./setup.sh"})," script with the desired module name, e.g., ",(0,i.jsx)(o.code,{children:"./setup.sh github.com/awesome-org/conduit-processor-file"}),"."]}),"\n",(0,i.jsxs)(o.li,{children:["(Optional) Define code owners in the ",(0,i.jsx)(o.code,{children:"CODEOWNERS"})," file."]}),"\n"]}),"\n",(0,i.jsx)(o.admonition,{type:"note",children:(0,i.jsxs)(o.p,{children:["By convention the name of the repository should be conduit-processor-",(0,i.jsx)(o.code,{children:"processor name"}),". So if you would like to reference the processor using foo, the repository should be named conduit-processor-foo."]})}),"\n",(0,i.jsx)(o.h2,{id:"developing-processors",children:"Developing Processors"}),"\n",(0,i.jsxs)(o.p,{children:["Implement a processor by defining a struct that satisfies the ",(0,i.jsx)(o.a,{href:"https://pkg.go.dev/github.com/conduitio/conduit-processor-sdk#Processor",children:"sdk.Processor"})," interface."]}),"\n",(0,i.jsx)(o.p,{children:"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."}),"\n",(0,i.jsx)(o.p,{children:"Further information on developing a processor can be found at the following link(s):"}),"\n",(0,i.jsxs)(o.ul,{children:["\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"/docs/developing/processors/building",children:"Build your own"})}),"\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"/docs/developing/processors/how-it-works",children:"How it works"})}),"\n"]})]})}function p(e={}){const{wrapper:o}={...(0,t.R)(),...e.components};return o?(0,i.jsx)(o,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},28453:(e,o,s)=>{s.d(o,{R:()=>r,x:()=>c});var n=s(96540);const i={},t=n.createContext(i);function r(e){const o=n.useContext(t);return n.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function c(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(t.Provider,{value:o},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.