snap_plugin.v1.publisher module¶
-
class
snap_plugin.v1.publisher.
Publisher
(name, version, **kwargs)¶ Bases:
snap_plugin.v1.plugin.Plugin
Abstract base class for ‘publisher’ plugins.
This class makes the creation of snap ‘publisher’ plugins as easy as possible. For instance, when a class inherits from
snap_plugin.v1.publisher.Publisher
plugins can be created by providing implementation for:-
publish
(metrics, config)¶ Publishes metrics.
This method is
abstract
so the implementation must be provided by the plugin which extendssnap_plugin.v1.Publisher
.This method is called by the Snap deamon during the publish phase of a Snap workflow.
Parameters: - metrics (
list
ofsnap_plugin.v1.Metric
) – List of metrics to be published. - config (
snap_plugin.v1.ConfigMap
) – Dict of config values.
Returns: None
- metrics (
-