import logging
from queue import Queue
from monitoring.proto.context_pb2 import Empty
from monitoring.proto.monitoring_pb2 import IncludeKpiRequest
from monitoring.proto.monitoring_pb2_grpc import MonitoringServiceServicer

LOGGER = logging.getLogger(__name__)

class MockMonitoringServiceServicerImpl(MonitoringServiceServicer):
    def __init__(self, queue_samples : Queue):
        self.queue_samples = queue_samples

    def IncludeKpi(self, request : IncludeKpiRequest, context) -> Empty:
        LOGGER.info('[IncludeKpi] begin')
        self.queue_samples.put(request)
        LOGGER.info('[IncludeKpi] end')
        return Empty()
