Adding Plugins
New plugins are the most common contribution to Meteor. This page is the short checklist for each plugin type; the extractor tutorial walks through the full process with code.
Adding a new extractor
- Follow the write an extractor tutorial for the package layout, interfaces, and registration.
- Register your extractor in
plugins/extractors/populate.go. - Write unit tests. Run them with
make test-plugins PLUGIN=extractors/<name>. - Write a
README.mdin the plugin directory (example). - Add a docs page under
docs/content/docs/extractors/and a row to the overview table.
Adding a new processor
- Implement
Process(ctx, record) (record, error)and embedplugins.BasePlugin. - Register your processor in
plugins/processors/populate.go. - Write unit tests. If you need a live source, use the Docker test utility in
test/utils(example). - Write a
README.mdand add a docs page underdocs/content/docs/processors/.
Adding a new sink
- Implement
Sink(ctx, batch []models.Record) errorandClose() error, and embedplugins.BasePlugin. - Return
plugins.NewRetryErrorfor errors Meteor should retry, such as HTTP 5xx responses. - Register your sink in
plugins/sinks/populate.go. - Write unit tests.
- Write a
README.mdand add a docs page underdocs/content/docs/sinks/.