Current Path : /usr/lib/python2.7/dist-packages/landscape/ |
Current File : //usr/lib/python2.7/dist-packages/landscape/amp.pyc |
Tc @ s d Z d d l Z d d l Z d d l m Z m Z m Z d e f d YZ d Z d Z d e f d YZ d Z d S( sh Communication between components in different services via twisted AMP. The Landscape client is composed by several processes that need to talk to each other. For example the monitor and manager processes need to talk to the broker in order to ask it to add new messages to the outgoing queue, and the broker needs to talk to them in order to dispatch them incoming messages from the server. This module implements a few conveniences built around L{landscape.lib.amp} to let the various services connect to each other in an easy and idiomatic way, and have them respond to standard requests like "ping" or "exit". iN( t MethodCallClientFactoryt MethodCallServerFactoryt RemoteObjectt ComponentPublisherc B s/ e Z d Z e Z d Z d Z d Z RS( s Publish a Landscape client component using a UNIX socket. Other Landscape client processes can then connect to the socket and invoke methods on the component remotely, using L{MethodCall} commands. @param component: The component to publish. It can be any Python object implementing the methods listed in the C{methods} class variable. @param reactor: The L{LandscapeReactor} used to listen to the socket. @param config: The L{Configuration} object used to build the socket path. c C sC | | _ | | _ | | _ d | _ t t | j | _ d S( N( t _reactort _configt _componentt Nonet _portt get_remote_methodst typet keyst methods( t selft componentt reactort config( ( s1 /usr/lib/python2.7/dist-packages/landscape/amp.pyt __init__"