Skip to content

deep.processor.context.action_results

Handler results of actions.

ActionCallback

A call back to 'close' an action.

Source code in deep/processor/context/action_results.py
class ActionCallback:
    """A call back to 'close' an action."""

    @abc.abstractmethod
    def process(self, ctx: 'TriggerContext', event: str, frame: FrameType, arg: any) -> bool:
        """
        Process a callback.

        :param ctx: the context for this trigger
        :param event: the event
        :param frame: the frame data
        :param arg: the arg from settrace
        :return: True, to keep this callback until next match.
        """
        pass

process(ctx, event, frame, arg) abstractmethod

Process a callback.

:param ctx: the context for this trigger :param event: the event :param frame: the frame data :param arg: the arg from settrace :return: True, to keep this callback until next match.

Source code in deep/processor/context/action_results.py
@abc.abstractmethod
def process(self, ctx: 'TriggerContext', event: str, frame: FrameType, arg: any) -> bool:
    """
    Process a callback.

    :param ctx: the context for this trigger
    :param event: the event
    :param frame: the frame data
    :param arg: the arg from settrace
    :return: True, to keep this callback until next match.
    """
    pass

ActionResult

Bases: ABC

ActionResult represents the result of a trigger action.

This could be the snapshot to ship, logs to process or a span to close.

Source code in deep/processor/context/action_results.py
class ActionResult(abc.ABC):
    """
    ActionResult represents the result of a trigger action.

    This could be the snapshot to ship, logs to process or a span to close.
    """

    @abc.abstractmethod
    def process(self, ctx: 'TriggerContext') -> Optional[ActionCallback]:
        """
        Process this result.

        :param ctx: the triggering context

        :return: an action callback if we need to do something at the 'end', or None
        """
        pass

process(ctx) abstractmethod

Process this result.

:param ctx: the triggering context

:return: an action callback if we need to do something at the 'end', or None

Source code in deep/processor/context/action_results.py
@abc.abstractmethod
def process(self, ctx: 'TriggerContext') -> Optional[ActionCallback]:
    """
    Process this result.

    :param ctx: the triggering context

    :return: an action callback if we need to do something at the 'end', or None
    """
    pass