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

Method instance_ip

gateway/src/main_service.rs:950–952  ·  view source on GitHub ↗

Lookup an instance's IP. Returns `None` if the instance is unknown.

(&self, instance_id: &str)

Source from the content-addressed store, hash-verified

948
949 /// Lookup an instance's IP. Returns `None` if the instance is unknown.
950 pub(crate) fn instance_ip(&self, instance_id: &str) -> Option<Ipv4Addr> {
951 self.state.instances.get(instance_id).map(|i| i.ip)
952 }
953
954 /// Lookup the effective port_policy for an instance: admin override wins,
955 /// otherwise fall back to the instance-reported policy. `None` means

Callers 2

is_port_allowedFunction · 0.80
fetch_and_storeFunction · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected