mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-12 16:51:02 +00:00
Expose node's IP address via feed (#491)
* Fix typos Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Extend `feed::LocatedNode` message with optional IP address Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Expose IpAddr from locator task Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Expose CLI flag to handle IP Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * tests: Consider Option<String> for IP address Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Add node's IP directly to the Node's details Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Adjust testing and serialize node's ip address Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * frontend: Propagate IP address for deserialization purposes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * core: Clarify the CLI flag documentation Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -76,7 +76,7 @@ where
|
||||
);
|
||||
}
|
||||
|
||||
// Just a little ceremony we need to go to to return the correct response key:
|
||||
// Just a little ceremony to return the correct response key:
|
||||
let mut accept_key_buf = [0; 32];
|
||||
let accept_key = generate_websocket_accept_key(key.as_bytes(), &mut accept_key_buf);
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! This is the internal represenation of telemetry messages sent from nodes.
|
||||
//! This is the internal representation of telemetry messages sent from nodes.
|
||||
//! There is a separate JSON representation of these types, because internally we want to be
|
||||
//! able to serialize these messages to bincode, and various serde attribtues aren't compatible
|
||||
//! able to serialize these messages to bincode, and various serde attributes aren't compatible
|
||||
//! with this, hence this separate internal representation.
|
||||
|
||||
use crate::node_types::{Block, BlockHash, BlockNumber, NodeDetails};
|
||||
@@ -159,6 +159,7 @@ mod tests {
|
||||
network_id: ArrayString::new(),
|
||||
startup_time: None,
|
||||
sysinfo: None,
|
||||
ip: Some("127.0.0.1".into()),
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -42,6 +42,7 @@ pub struct NodeDetails {
|
||||
pub target_arch: Option<Box<str>>,
|
||||
pub target_env: Option<Box<str>>,
|
||||
pub sysinfo: Option<NodeSysInfo>,
|
||||
pub ip: Option<Box<str>>,
|
||||
}
|
||||
|
||||
/// Hardware and software information for the node.
|
||||
|
||||
Reference in New Issue
Block a user