Using the sample plugin
Bókun provides a sample plugin implementation in Java 8 which you can use to speed up the development. The plugin is available at https://github.com/Bokun/sample_inventory_plugin.
The first step is to check the plugin and build it:
> git clone email@example.com:Bokun/sample_inventory_plugin.git
> cd <your plugin root directory>
> ./gradlew build
> export SAMPLE_PLUGIN_PORT=8080
> ./gradlew run --args="-grpc"
Providing all the above steps are successfully finished, you should have a gRPC service listening on port 8080. If you want to run the same plugin on REST, the last line should be
> ./gradlew run --args="-rest"
If you want to enable TLS/SSL, you will have to export the following environment variables:
If the certificate is not trusted by the JVM, you will have to supply the same file to the harness (see below) in order to make sure the secure connection can be established.
If you want to enable shared secret support, you will have to export the following environment variable:
When testing, the same phrase should be configured on the harness end (see below).