MCPcopy
hub / github.com/jackc/pgx / NewBackend

Function NewBackend

pgproto3/backend.go:54–57  ·  view source on GitHub ↗

NewBackend creates a new Backend.

(r io.Reader, w io.Writer)

Source from the content-addressed store, hash-verified

52
53// NewBackend creates a new Backend.
54func NewBackend(r io.Reader, w io.Writer) *Backend {
55 cr := newChunkReader(r, 0)
56 return &Backend{cr: cr, w: w}
57}
58
59// Send sends a message to the frontend (i.e. the client). The message is buffered until Flush is called. Any error
60// encountered will be returned from Flush.

Callers 15

TestStartupMessageFunction · 0.92
FuzzBackendFunction · 0.92
NewPgFortuneBackendFunction · 0.92
NewFunction · 0.92
TestScriptFunction · 0.92
TestConnectTimeoutFunction · 0.92
TestSNISupportFunction · 0.92

Calls 1

newChunkReaderFunction · 0.85

Tested by 14

TestStartupMessageFunction · 0.74
FuzzBackendFunction · 0.74
TestScriptFunction · 0.74
TestConnectTimeoutFunction · 0.74
TestSNISupportFunction · 0.74