Esempio n. 1
0
 def convert(address, b_raised=True):
     if type(address) is str:
         return tuple(Address.from_host_port_family(address))
     elif type(address) is Address:
         return tuple(address)
     elif b_raised:
         raise ValueError("Couldn't convert {0} to elliptics.Address".format(repr(address)))
Esempio n. 2
0
 def convert(address, b_raised=True):
     if type(address) is str:
         return tuple(Address.from_host_port_family(address))
     elif type(address) is Address:
         return tuple(address)
     elif b_raised:
         raise ValueError("Couldn't convert {0} to elliptics.Address".format(repr(address)))
Esempio n. 3
0
 def forward(self):
     """
     If is set stick session to particular remote address.
     This remote won't handle request but will resend it to proper server node.
     If proper server node isn't available on forward node, forward node will fail request with -ENOTSUP error.
     """
     if self.__forward is None:
         return None
     return Address.from_host_port_family(self.__forward)
Esempio n. 4
0
 def forward(self):
     """
     If is set stick session to particular remote address.
     This remote won't handle request but will resend it to proper server node.
     If proper server node isn't available on forward node, forward node will fail request with -ENOTSUP error.
     """
     if self.__forward is None:
         return None
     return Address.from_host_port_family(self.__forward)