Skip to content

root_controller

drunc.grpc_testing_tools.root_controller

RootController Service Implementation

Provides the gRPC servicer implementation for the RootController service, which acts as an intermediate layer in the system hierarchy, coordinating between the Manager and ChildControllers.

Classes

RootControllerServiceImpl()

Bases: RootControllerServiceServicer

Implementation of RootController gRPC service.

The RootController service acts as an intermediate coordinator between the Manager and ChildControllers. It handles connectivity testing, command processing, status collection, and graceful shutdown requests.

Initialise the RootController service implementation.

Source code in drunc/grpc_testing_tools/root_controller.py
def __init__(self):
    """Initialise the RootController service implementation."""
    pass
Functions
MakeRequest(request, context)

Handle incoming connectivity test requests.

Parameters:

Name Type Description Default
request

DummyRequest containing message and timestamp

required
context

gRPC context object

required

Returns:

Type Description

DummyResponse with echoed message confirming RootController is responsive

Source code in drunc/grpc_testing_tools/root_controller.py
def MakeRequest(self, request, context):
    """
    Handle incoming connectivity test requests.

    Args:
        request: DummyRequest containing message and timestamp
        context: gRPC context object

    Returns:
        DummyResponse with echoed message confirming RootController is responsive
    """
    return DummyResponse(reply=f"RootController server response: {request.message}")