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

Method Step

internal/pgmock/pgmock.go:110–123  ·  view source on GitHub ↗
(backend *pgproto3.Backend)

Source from the content-addressed store, hash-verified

108type waitForCloseMessageStep struct{}
109
110func (e *waitForCloseMessageStep) Step(backend *pgproto3.Backend) error {
111 for {
112 msg, err := backend.Receive()
113 if err == io.EOF {
114 return nil
115 } else if err != nil {
116 return err
117 }
118
119 if _, ok := msg.(*pgproto3.Terminate); ok {
120 return nil
121 }
122 }
123}
124
125func WaitForClose() Step {
126 return &waitForCloseMessageStep{}

Callers

nothing calls this directly

Calls 1

ReceiveMethod · 0.45

Tested by

no test coverage detected