agent: Add IBatchableTelem

IBatchableTelem adds two methods to the ITelem interface. These methods allow
a telemetry object to mange batches of telemetry entries, rather than
just one.
This commit is contained in:
Mike Salvatore 2021-06-24 12:08:23 -04:00
parent 2ec020f276
commit f2a940a4e0
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
from __future__ import annotations
import abc
from typing import Iterable
from infection_monkey.telemetry.i_telem import ITelem
class IBatchableTelem(ITelem, metaclass=abc.ABCMeta):
@abc.abstractmethod
def get_telemetry_entries(self) -> Iterable:
pass
@abc.abstractmethod
def add_telemetry_to_batch(self, telemetry: IBatchableTelem):
pass