Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Global

Code Block
languagejs
//*
 * Plugin to register with the container on initialization.
register(String pluginId, Object config)

config = {
 * pluginConfig = {
 *	pluginVer: String,
 *	apiToken: String,
 *	apiBaseURL: String,
 *	apiTokenRefreshFn: Function
 * }
 */
register = function(String pluginId, Object pluginConfig){};

/*
 * Get the plugin configuration.
 * @param pluginId String
 * @return pluginConfig
 */
get = function(String pluginId): pluginConfig {}

Telemetry SDK

Code Block
languagejs
// API to register a plugin and it's corresponding sync url to dispatch telemetry to.
register(String pluginId, String syncURL)

// API to log/store a telemetry event
send(String event, String pluginId) : Promise;

// API to log/store an array of telemetry events
send(Array[String] events, String pluginId) : Promise;

// API to receive a batch of telemetry events in zip stream
sendBatch(String batchEvent, String pluginId) : Promise;

// API to receive a batch of telemetry events in zip stream
sendBatch(byte[] events, String pluginId) : Promise;

// API to force sync
sync(String pluginId) : Promise;

// API to get the status of events/batches for a given plugin id
// Response - {events: 3456, batches: 20}
status(String pluginId) : Promise;

...