MCPcopy Create free account
hub / github.com/PostHog/duckgres / buildRawStartup

Function buildRawStartup

server/wire/protocol_test.go:31–36  ·  view source on GitHub ↗

buildRawStartup writes an arbitrary (possibly invalid) length header followed by payload bytes.

(length int32, payload []byte)

Source from the content-addressed store, hash-verified

29
30// buildRawStartup writes an arbitrary (possibly invalid) length header
31// followed by payload bytes.
32func buildRawStartup(length int32, payload []byte) []byte {
33 var msg bytes.Buffer
34 _ = binary.Write(&msg, binary.BigEndian, length)
35 msg.Write(payload)
36 return msg.Bytes()
37}
38
39func TestReadStartupMessageValid(t *testing.T) {

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected