MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / start_protocol

Method start_protocol

src/pglite/postgres_mod.rs:1382–1399  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1380 }
1381
1382 fn start_protocol(&mut self) -> Result<()> {
1383 if self.started {
1384 return Ok(());
1385 }
1386 let startup = startup_packet(&self.startup_config.username, &self.startup_config.database);
1387 let response = self.start_protocol_with_startup_packet(&startup)?;
1388 ensure!(
1389 response.accepted,
1390 "PGlite WASIX startup packet was rejected: {}",
1391 summarize_protocol(&response.output)
1392 );
1393 ensure!(
1394 !protocol_response_contains_error(&response.output),
1395 "PGlite WASIX startup packet returned an error: {}",
1396 summarize_protocol(&response.output)
1397 );
1398 Ok(())
1399 }
1400
1401 pub(crate) fn start_protocol_with_startup_packet(
1402 &mut self,

Callers 2

send_protocolMethod · 0.80
send_protocol_pumpMethod · 0.80

Calls 2

startup_packetFunction · 0.85

Tested by

no test coverage detected