snap_plugin.v1.processor module¶
-
class
snap_plugin.v1.processor.Processor(name, version, **kwargs)¶ Bases:
snap_plugin.v1.plugin.PluginAbstract base class for ‘processor’ plugins.
This class makes the creation of snap ‘processor’ plugins as easy as possible. For instance, when a class inherits from
snap_plugin.v1.processor.Processplugins can be created by providing implementation for:-
process(metrics, config)¶ Process metrics.
This method is
abstractso the implementation must be provided by the plugin which extendssnap_plugin.v1.Processor.This method is called by the Snap deamon during the process phase of the execution of a Snap workflow. Examples of processing metrics include applying filtering, max, min, average functions as well as adding additional context to the metrics to name just a few.
Parameters: (obj (metrics) – listofsnap_plugin.v1.Metric): List of metrics to be processed.Returns: List of processed metrics. Return type: listofsnap_plugin.v1.Metric
-