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
Methods:
Kill(request, context)
Handle shutdown requests from the Manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
KillRequest
|
KillRequest containing reason and grace period |
required |
context
|
ServicerContext
|
gRPC context object |
required |
Returns:
| Type | Description |
|---|---|
KillResponse
|
KillResponse indicating that shutdown has been initiated |
Source code in drunc/grpc_testing_tools/root_controller.py
MakeRequest(request, context)
Handle incoming connectivity test requests.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
DummyRequest
|
DummyRequest containing message and timestamp |
required |
context
|
ServicerContext
|
gRPC context object |
required |
Returns:
| Type | Description |
|---|---|
DummyResponse
|
DummyResponse with echoed message confirming RootController is responsive |
Source code in drunc/grpc_testing_tools/root_controller.py
ReceiveCommand(request, context)
Handle incoming command requests from the Manager.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
CommandRequest
|
CommandRequest containing command details |
required |
context
|
ServicerContext
|
gRPC context object |
required |
Returns:
| Type | Description |
|---|---|
CommandResponse
|
CommandResponse indicating success or failure of command execution |
Source code in drunc/grpc_testing_tools/root_controller.py
ReceiveStatus(request, context)
Handle incoming status reports from ChildControllers.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
StatusRequest
|
DummyRequest containing status details |
required |
context
|
ServicerContext
|
gRPC context object |
required |
Returns:
| Type | Description |
|---|---|
StatusResponse
|
StatusResponse acknowledging receipt of the status report |