This commit is contained in:
Jack Robison 2018-08-03 13:32:57 -04:00
parent 15161dd429
commit 049936f4a6
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
4 changed files with 119 additions and 82 deletions

View file

@ -1045,15 +1045,8 @@
"description": "Set daemon settings" "description": "Set daemon settings"
}, },
{ {
"arguments": [ "arguments": [],
{ "returns": "(dict) lbrynet-daemon status\n {\n 'installation_id': (str) installation id - base58,\n 'is_running': (bool),\n 'is_first_run': bool,\n 'skipped_components': (list) [names of skipped components (str)],\n 'startup_status': { Does not include components which have been skipped\n 'database': (bool),\n 'wallet': (bool),\n 'session': (bool),\n 'dht': (bool),\n 'hash_announcer': (bool),\n 'stream_identifier': (bool),\n 'file_manager': (bool),\n 'blob_manager': (bool),\n 'blockchain_headers': (bool),\n 'peer_protocol_server': (bool),\n 'reflector': (bool),\n 'upnp': (bool),\n 'exchange_rate_manager': (bool),\n },\n 'connection_status': {\n 'code': (str) connection status code,\n 'message': (str) connection status message\n },\n 'blockchain_headers': {\n 'downloading_headers': (bool),\n 'download_progress': (float) 0-100.0\n },\n 'wallet': {\n 'blocks': (int) local blockchain height,\n 'blocks_behind': (int) remote_height - local_height,\n 'best_blockhash': (str) block hash of most recent block,\n 'is_encrypted': (bool)\n },\n 'dht': {\n 'node_id': (str) lbry dht node id - hex encoded,\n 'peers_in_routing_table': (int) the number of peers in the routing table,\n },\n 'blob_manager': {\n 'finished_blobs': (int) number of finished blobs in the blob manager,\n },\n 'hash_announcer': {\n 'announce_queue_size': (int) number of blobs currently queued to be announced\n },\n 'file_manager': {\n 'managed_files': (int) count of files in the file manager,\n }\n }",
"is_required": false,
"type": "bool",
"name": "session_status",
"description": "include session status in results"
}
],
"returns": "(dict) lbrynet-daemon status\n {\n 'installation_id': (str) installation id - base58,\n 'is_running': (bool),\n 'is_first_run': bool,\n 'skipped_components': (list) [names of skipped components (str)],\n 'startup_status': { Does not include components which have been skipped\n 'database': (bool),\n 'wallet': (bool),\n 'session': (bool),\n 'dht': (bool),\n 'hash_announcer': (bool),\n 'stream_identifier': (bool),\n 'file_manager': (bool),\n 'peer_protocol_server': (bool),\n 'reflector': (bool),\n 'upnp': (bool),\n 'exchange_rate_manager': (bool),\n },\n 'connection_status': {\n 'code': (str) connection status code,\n 'message': (str) connection status message\n },\n 'blockchain_status': {\n 'blocks': (int) local blockchain height,\n 'blocks_behind': (int) remote_height - local_height,\n 'best_blockhash': (str) block hash of most recent block,\n },\n 'dht_node_status': {\n 'node_id': (str) lbry dht node id - hex encoded,\n 'peers_in_routing_table': (int) the number of peers in the routing table,\n },\n 'wallet_is_encrypted': (bool),\n If given the session status option:\n 'session_status': {\n 'managed_blobs': (int) count of blobs in the blob manager,\n 'managed_streams': (int) count of streams in the file manager,\n 'announce_queue_size': (int) number of blobs currently queued to be announced,\n 'should_announce_blobs': (int) number of blobs that should be announced,\n }\n }",
"name": "status", "name": "status",
"description": "Get daemon status" "description": "Get daemon status"
}, },

View file

@ -1579,12 +1579,12 @@ Usage:
Options: Options:
--a_arg : a arg --a_arg : (bool) a arg
--b_arg : b arg --b_arg : (bool) b arg
--pos_arg=<pos_arg> : pos arg --pos_arg=<pos_arg> : (int) pos arg
--pos_args=<pos_args> : pos args --pos_args=<pos_args> : (int) pos args
--pos_arg2=<pos_arg2> : pos arg 2 --pos_arg2=<pos_arg2> : (int) pos arg 2
--pos_arg3=<pos_arg3> : pos arg 3 --pos_arg3=<pos_arg3> : (int) pos arg 3
Returns: Returns:
pos args pos args
@ -1828,14 +1828,16 @@ Returns:
</code></pre> </code></pre>
<h2 id="peer_ping">peer_ping</h2> <h2 id="peer_ping">peer_ping</h2>
<pre><code class="text">Find and ping a peer by node id <pre><code class="text">Send a kademlia ping to the specified peer. If address and port are provided the peer is directly pinged,
if not provided the peer is located first.
Usage: Usage:
peer_ping (&lt;node_id&gt; | --node_id=&lt;node_id&gt;) peer_ping (&lt;node_id&gt; | --node_id=&lt;node_id&gt;) [&lt;address&gt; | --address=&lt;address&gt;] [&lt;port&gt; | --port=&lt;port&gt;]
Options: Options:
None --address=&lt;address&gt; : (str) ip address of the peer
--port=&lt;port&gt; : (int) udp port of the peer
Returns: Returns:
(str) pong, or {'error': &lt;error message&gt;} if an error is encountered (str) pong, or {'error': &lt;error message&gt;} if an error is encountered
@ -2110,41 +2112,61 @@ Returns:
<pre><code class="text">Get daemon status <pre><code class="text">Get daemon status
Usage: Usage:
status [--session_status] status
Options: Options:
--session_status : (bool) include session status in results None
Returns: Returns:
(dict) lbrynet-daemon status (dict) lbrynet-daemon status
{ {
'lbry_id': lbry peer id, base58, 'installation_id': (str) installation id - base58,
'installation_id': installation id, base58, 'is_running': (bool),
'is_running': bool,
'is_first_run': bool, 'is_first_run': bool,
'startup_status': { 'skipped_components': (list) [names of skipped components (str)],
'code': status code, 'startup_status': { Does not include components which have been skipped
'message': status message 'database': (bool),
'wallet': (bool),
'session': (bool),
'dht': (bool),
'hash_announcer': (bool),
'stream_identifier': (bool),
'file_manager': (bool),
'blob_manager': (bool),
'blockchain_headers': (bool),
'peer_protocol_server': (bool),
'reflector': (bool),
'upnp': (bool),
'exchange_rate_manager': (bool),
}, },
'connection_status': { 'connection_status': {
'code': connection status code, 'code': (str) connection status code,
'message': connection status message 'message': (str) connection status message
}, },
'blockchain_status': { 'blockchain_headers': {
'blocks': local blockchain height, 'downloading_headers': (bool),
'blocks_behind': remote_height - local_height, 'download_progress': (float) 0-100.0
'best_blockhash': block hash of most recent block,
}, },
'wallet_is_encrypted': bool, 'wallet': {
'blocks': (int) local blockchain height,
If given the session status option: 'blocks_behind': (int) remote_height - local_height,
'session_status': { 'best_blockhash': (str) block hash of most recent block,
'managed_blobs': count of blobs in the blob manager, 'is_encrypted': (bool)
'managed_streams': count of streams in the file manager },
'announce_queue_size': number of blobs currently queued to be announced 'dht': {
'should_announce_blobs': number of blobs that should be announced 'node_id': (str) lbry dht node id - hex encoded,
} 'peers_in_routing_table': (int) the number of peers in the routing table,
},
'blob_manager': {
'finished_blobs': (int) number of finished blobs in the blob manager,
},
'hash_announcer': {
'announce_queue_size': (int) number of blobs currently queued to be announced
},
'file_manager': {
'managed_files': (int) count of files in the file manager,
}
} }
</code></pre> </code></pre>

View file

@ -1479,12 +1479,12 @@ Returns:
<h2 id="cli_test_command">cli_test_command</h2> <h2 id="cli_test_command">cli_test_command</h2>
<pre><code class="text">This command is only for testing the CLI argument parsing <pre><code class="text">This command is only for testing the CLI argument parsing
Args: Args:
'a_arg' : a arg 'a_arg' : (bool) a arg
'b_arg' : b arg 'b_arg' : (bool) b arg
'pos_arg' (required) : pos arg 'pos_arg' (required) : (int) pos arg
'pos_args' : pos args 'pos_args' : (int) pos args
'pos_arg2' : pos arg 2 'pos_arg2' : (int) pos arg 2
'pos_arg3' : pos arg 3 'pos_arg3' : (int) pos arg 3
Returns: Returns:
pos args pos args
@ -1682,10 +1682,12 @@ Returns:
</code></pre> </code></pre>
<h2 id="peer_ping">peer_ping</h2> <h2 id="peer_ping">peer_ping</h2>
<pre><code class="text">Find and ping a peer by node id <pre><code class="text">Send a kademlia ping to the specified peer. If address and port are provided the peer is directly pinged,
if not provided the peer is located first.
Args: Args:
None 'address' : (str) ip address of the peer
'port' : (int) udp port of the peer
Returns: Returns:
(str) pong, or {'error': &lt;error message&gt;} if an error is encountered (str) pong, or {'error': &lt;error message&gt;} if an error is encountered
@ -1913,37 +1915,57 @@ Returns:
<pre><code class="text">Get daemon status <pre><code class="text">Get daemon status
Args: Args:
'session_status' : (bool) include session status in results None
Returns: Returns:
(dict) lbrynet-daemon status (dict) lbrynet-daemon status
{ {
'lbry_id': lbry peer id, base58, 'installation_id': (str) installation id - base58,
'installation_id': installation id, base58, 'is_running': (bool),
'is_running': bool,
'is_first_run': bool, 'is_first_run': bool,
'startup_status': { 'skipped_components': (list) [names of skipped components (str)],
'code': status code, 'startup_status': { Does not include components which have been skipped
'message': status message 'database': (bool),
'wallet': (bool),
'session': (bool),
'dht': (bool),
'hash_announcer': (bool),
'stream_identifier': (bool),
'file_manager': (bool),
'blob_manager': (bool),
'blockchain_headers': (bool),
'peer_protocol_server': (bool),
'reflector': (bool),
'upnp': (bool),
'exchange_rate_manager': (bool),
}, },
'connection_status': { 'connection_status': {
'code': connection status code, 'code': (str) connection status code,
'message': connection status message 'message': (str) connection status message
}, },
'blockchain_status': { 'blockchain_headers': {
'blocks': local blockchain height, 'downloading_headers': (bool),
'blocks_behind': remote_height - local_height, 'download_progress': (float) 0-100.0
'best_blockhash': block hash of most recent block,
}, },
'wallet_is_encrypted': bool, 'wallet': {
'blocks': (int) local blockchain height,
If given the session status option: 'blocks_behind': (int) remote_height - local_height,
'session_status': { 'best_blockhash': (str) block hash of most recent block,
'managed_blobs': count of blobs in the blob manager, 'is_encrypted': (bool)
'managed_streams': count of streams in the file manager },
'announce_queue_size': number of blobs currently queued to be announced 'dht': {
'should_announce_blobs': number of blobs that should be announced 'node_id': (str) lbry dht node id - hex encoded,
} 'peers_in_routing_table': (int) the number of peers in the routing table,
},
'blob_manager': {
'finished_blobs': (int) number of finished blobs in the blob manager,
},
'hash_announcer': {
'announce_queue_size': (int) number of blobs currently queued to be announced
},
'file_manager': {
'managed_files': (int) count of files in the file manager,
}
} }
</code></pre> </code></pre>

File diff suppressed because one or more lines are too long