The receiver module¶
DeployHandler¶
LoggerHandler¶
-
class
marcodeployer.receiver.
LoggerHandler
(application, request, **kwargs)[source]¶ Processes the logging messages
-
check_origin
(origin)[source]¶ Overrides the parent method to return True for any request, since we are working without names
Returns: bool True
-
on_line
(user, command, message, ip, identifier, stop=False, stream_name='stdout', *args, **kwargs)[source]¶ The io_loop calls the function when a new message appears. :param str user: The name of the user :param str command: The command in execution :param str message: The message to deliver :param str ip: The ip of the server, so the client knows where the message comes from :param boolean stop: Determines if the connection must be closed or not deprecated :param str stream_name: The name of the stream
-
ProbeWSHandler¶
SocketHandler¶
Module methods¶
-
class
marcodeployer.receiver.
DeployHandler
(application, request, **kwargs)[source] -
-
post
(*args, **kwargs)[source] POST handler received from
deployer.py
. It handles the deployment of the file and the execution of the desired command.
-
-
class
marcodeployer.receiver.
LoggerHandler
(application, request, **kwargs)[source] Processes the logging messages
-
check_origin
(origin)[source] Overrides the parent method to return True for any request, since we are working without names
Returns: bool True
-
on_close
()[source] Removes the connection from the opensockets dictionary
-
on_line
(user, command, message, ip, identifier, stop=False, stream_name='stdout', *args, **kwargs)[source] The io_loop calls the function when a new message appears. :param str user: The name of the user :param str command: The command in execution :param str message: The message to deliver :param str ip: The ip of the server, so the client knows where the message comes from :param boolean stop: Determines if the connection must be closed or not deprecated :param str stream_name: The name of the stream
-
on_message
(message)[source] A message is sent by the client after creating the connection. The method verifies the user secret cookie and appends the connection to the opensockets dictionary.
Parameters: message (str) – The received message
-
open
()[source] Notifies the opening of a new Logger connection
-
-
class
marcodeployer.receiver.
ProbeWSHandler
(application, request, **kwargs)[source] -
check_origin
(origin)[source] Overrides the parent method to return True for any request, since we are working without names
Returns: bool True
-
open
()[source] Returns a confirmation message
-
-
class
marcodeployer.receiver.
SocketHandler
(application, request, **kwargs)[source] -
check_origin
(origin)[source] Overrides the parent method to return True for any request, since we are working without names
Returns: bool True
-
-
marcodeployer.receiver.
main
(args=None)[source]¶ Creates the servers, initializes the logging facility, publishes the
MarcoPolo
services and starts theio_loop
.