This module serves as an example on how to implement components as plugins using the service package API, and how to structure a go module to run your own bento distribution.
├── README.md
├── config.yaml - an example Bento config file using the plugin component from ./plugins/faker.go
├── go.mod - Go module definition for this module
├── go.sum - Go checksum file
├── plugins - Go package 'plugins'
│ ├── faker.go - An example 'input plugin component'
│ └── faker_test.go - An example unit test for the plugin
└── main.go - Go entrypoint
The faker_test.go contains an example unit test for the faker plugin component. You can run all tests with:
go test ./...To update your dependencies, you can use go's built-in dependency management system for example:
go get github.com/warpstreamlabs/bentoInclude a main.go file that has the entrypoint for your bento distribution, and call service.RunCLI.
See main.go's code comments for options regarding your main.go file.
To build & run a binary of your bento distribution:
go build
./plugin_example_module -c config.yamlSee config.yaml for an example of a bento config using the faker.go plugin.
There are a number of examples for different component types available here.