geiger_api 0.8.2 geiger_api: ^0.8.2 copied to clipboard
A Communication API for the GEIGER ecosystem. It provides a unified interface for all plugins to communicate and transfer control between the components of the ecosystem.
geiger_api #
This package contains the public interface to communicate in the GEIGER ecosystem.
Quick start #
To get an own API the first call should be:
GeigerApi? api = await getGeigerApi('<unspecified>', 'myPluginIdentifier');
followed by
api!.registerPlugin();
api!.activatePlugin();
If you want to register an event listener, you will have to do that before reigstering / activating the plugin.
final MessageLogger logger = MessageLogger();
// ...
// ...
// ...
api!.registerListener([MessageType.allEvents], logger); // Register the message logger as an event listener and listen to all Events
The specification of the executor is not clear yet but it is there so that code remains functional when the feature is implemented. The plugin ID ('myPluginIdentifier') needs to be unique in the ecosystem. Failure to choose a unique ID will result in unreliable communication behavior.
Running tests #
Run tests with --concurrency=1
. Else some tests will try to get the same port simultaneously.
iOS #
To get started with iOS, checkout the iOS documentation