minos.networks.utils

Functions

consume_queue(queue, max_count)

Consume count at least 1 and at most max_count elements from the given queue.

get_host_ip()

Get the host ip.

get_host_name()

Get the host name.

get_ip(name)

Get the ip address.

get_host_ip()[source]

Get the host ip.

Returns

A string value.

Return type

str

get_host_name()[source]

Get the host name.

Returns

A string value.

Return type

str

get_ip(name)[source]

Get the ip address.

Parameters

name (str) – The name to be converted to an ip.

Returns

A string value.

Return type

str

async consume_queue(queue, max_count)[source]

Consume count at least 1 and at most max_count elements from the given queue.

Parameters
  • queue – The queue to be consumed.

  • max_count (int) – The max count of elements to be consumed.

Returns

This function does not return anything.

Return type

None