nanover.core.command_service module

Module providing an implementation of the CommandServicer.

class nanover.core.command_service.CommandService(*args, **kwargs)

Bases: CommandServicer, CommandService

Implementation of the Command service, enabling services to register arbitrary commands which are run as callbacks.

GetCommands(request, context) GetCommandsReply

GRPC method to get all of the commands available on this service.

Parameters:
  • requestGetCommandsRequest

  • context – GRPC context.

Returns:

GetCommandsReply, detailing all the available commands.

RunCommand(request, context) CommandReply

GRPC method to run a command.

Parameters:
  • requestCommandMessage detailing the command to run and any arguments.

  • context – GRPC context.

Returns:

CommandReply, consisting of any results of the command.