deep.grpc
Collection of functions to convert to protobuf version of types.
We do not use the protobuf types throughout the project as they do not autocomplete or have type definitions that work in IDE. It also makes it easier to deal with agent functionality by having local types we can modify.
convert_label_expressions(label_expressions)
Convert a label expression.
:param label_expressions: the expression to convert. :return: the converted expression
Source code in deep/grpc/__init__.py
convert_resource(resource)
Convert an internal resource to GRPC type.
:param resource: the resource to convert :return: the converted type as GRPC.
convert_response(response)
Convert a response from GRPC to internal types.
This function should create a list of Triggers from the incoming configuration. The Trigger should be a location with one or more actions to perform at that location.
:param response: the response from the poll request :return: a list of trigger locations with the appropriate actions
Source code in deep/grpc/__init__.py
convert_value(value)
Convert a value from the python type.
:param value: the value to convert :return: the value wrapped in the appropriate AnyValue type.