MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / parse_node_info_key

Function parse_node_info_key

gateway/src/kv/mod.rs:364–366  ·  view source on GitHub ↗

Parse node_id from node/info/{node_id} key

(key: &str)

Source from the content-addressed store, hash-verified

362
363 /// Parse node_id from node/info/{node_id} key
364 pub fn parse_node_info_key(key: &str) -> Option<NodeId> {
365 key.strip_prefix(NODE_INFO_PREFIX)?.parse().ok()
366 }
367}
368
369pub fn encode<T: Serialize>(value: &T) -> Result<Vec<u8>> {

Callers 1

load_all_nodesMethod · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected