def __init__(self, node): # base ctor NativeProcess.__init__(self, config=None, reactor=node._reactor, personality=node.personality) # associated node self._node = node self._realm = node._realm self.cbdir = self._node._cbdir self._uri_prefix = u'crossbar' self._started = None self._pid = os.getpid() # map of worker processes: worker_id -> NativeWorkerProcess self._workers = {} # shutdown of node is requested, and further requests to shutdown (or start) # are denied self._shutdown_requested = False # when shutting down, this flags marks if the shutdown is graceful and clean, # and expected (under the node configuration/settings) or if the shutdown is # under error or unnormal conditions. this flag controls the final exit # code returned by crossbar: 0 in case of "clean shutdown", and 1 otherwise self._shutdown_was_clean = None # node-wide system monitor running here in the node controller self._smonitor = SystemMonitor()
def __init__(self, node): """ :param node: The node singleton for this node controller session. :type node: obj """ # base ctor NativeProcess.__init__(self, config=None, reactor=node._reactor, personality=node.personality) # associated node self._node = node self._realm = node._realm self.cbdir = self._node._cbdir self._uri_prefix = u'crossbar' self._started = None self._pid = os.getpid() # map of worker processes: worker_id -> NativeWorkerProcess self._workers = {} # shutdown of node is requested, and further requests to shutdown (or start) # are denied self._shutdown_requested = False # when shutting down, this flags marks if the shutdown is graceful and clean, # and expected (under the node configuration/settings) or if the shutdown is # under error or unnormal conditions. this flag controls the final exit # code returned by crossbar: 0 in case of "clean shutdown", and 1 otherwise self._shutdown_was_clean = None
def __init__(self, config=None, reactor=None, personality=None): # base ctor NativeProcess.__init__(self, config=config, reactor=reactor, personality=personality) # Release (public) key self._release_pubkey = _read_release_key()
def __init__(self, config=None, reactor=None, personality=None): # base ctor NativeProcess.__init__(self, config=config, reactor=reactor, personality=personality) # Release (public) key self._release_pubkey = _read_release_key() # Node (private) key (as a string, in hex) node_key_hex = _read_node_key(self.config.extra.cbdir, private=True)['hex'] privkey = nacl.signing.SigningKey(node_key_hex, encoder=nacl.encoding.HexEncoder) # WAMP-cryptosign signing key self._node_key = cryptosign.SigningKey(privkey)
def __init__(self, node): # call base ctor extra = namedtuple('Extra', ['node', 'worker'])(node._node_id, 'controller') config = ComponentConfig(realm=node._realm, extra=extra) NativeProcess.__init__(self, config=config, reactor=node._reactor, personality=node.personality) # associated node self._node = node # node directory self.cbdir = self._node._cbdir # overwrite URI prefix for controller (normally: "crossbar.worker.<worker_id>") self._uri_prefix = 'crossbar' self._started = None self._pid = os.getpid() # map of worker processes: worker_id -> NativeWorkerProcess self._workers = { # add worker tracking instance to the worker map for the controller itself (!) .. # 'controller': self } # shutdown of node is requested, and further requests to shutdown (or start) # are denied self._shutdown_requested = False # when shutting down, this flags marks if the shutdown is graceful and clean, # and expected (under the node configuration/settings) or if the shutdown is # under error or unnormal conditions. this flag controls the final exit # code returned by crossbar: 0 in case of "clean shutdown", and 1 otherwise self._shutdown_was_clean = None # node-wide system monitor running here in the node controller self._smonitor = SystemMonitor()
def __init__(self, config=None, reactor=None, personality=None): # base ctor NativeProcess.__init__(self, config=config, reactor=reactor, personality=personality)
def __init__(self, config=None, reactor=None, personality=None): # base ctor NativeProcess.__init__(self, config=config, reactor=reactor, personality=personality)