
Public Member Functions | |
| def | __init__ (self, args=None, **kwargs) |
| def | emit (self, topic, msg, stamp=None, match=None, index=None) |
| def | emit_meta (self) |
| def | is_highlighting (self) |
Public Member Functions inherited from grepros.outputs.Sink | |
| def | __enter__ (self) |
| def | __exit__ (self, exc_type, exc_value, traceback) |
| def | autodetect (cls, target) |
| def | bind (self, source) |
| def | close (self) |
| def | flush (self) |
| def | thread_excepthook (self, text, exc) |
| def | validate (self) |
Static Public Attributes | |
| DEFAULT_ARGS = dict(EMIT=None, METAEMIT=None, HIGHLIGHT=False) | |
| Constructor argument defaults. More... | |
Static Public Attributes inherited from grepros.outputs.Sink | |
| DEFAULT_ARGS = dict(META=False) | |
| Constructor argument defaults. More... | |
| tuple | FILE_EXTENSIONS = () |
| Auto-detection file extensions for subclasses, as (".ext", ) More... | |
Additional Inherited Members | |
Public Attributes inherited from grepros.outputs.Sink | |
| args | |
| source | |
| inputs.Source instance bound to this sink More... | |
| valid | |
| Result of validate() More... | |
Provides messages to callback function.
Definition at line 812 of file outputs.py.
| def grepros.outputs.AppSink.__init__ | ( | self, | |
args = None, |
|||
| ** | kwargs | ||
| ) |
@param args arguments as namespace or dictionary, case-insensitive;
or emit callback
@param args.emit callback(topic, msg, stamp, highlighted msg, index in topic), if any
@param args.metaemit callback(metadata dict) if any, invoked before first emit from source batch
@param args.highlight whether to expect highlighted matching fields from source messages
@param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented from grepros.outputs.Sink.
Definition at line 818 of file outputs.py.
| def grepros.outputs.AppSink.emit | ( | self, | |
| topic, | |||
| msg, | |||
stamp = None, |
|||
match = None, |
|||
index = None |
|||
| ) |
Registers message and invokes registered emit callback, if any.
Reimplemented from grepros.outputs.Sink.
Definition at line 839 of file outputs.py.
| def grepros.outputs.AppSink.emit_meta | ( | self | ) |
Invokes registered metaemit callback, if any, and not already invoked.
Reimplemented from grepros.outputs.Sink.
Definition at line 831 of file outputs.py.
| def grepros.outputs.AppSink.is_highlighting | ( | self | ) |
Returns whether emitted matches are highlighted.
Reimplemented from grepros.outputs.Sink.
Definition at line 845 of file outputs.py.
|
static |
Constructor argument defaults.
Definition at line 816 of file outputs.py.