MCPcopy
hub / github.com/grpc/grpc-go / Drain

Method Drain

internal/transport/http2_server.go:1372–1380  ·  view source on GitHub ↗
(debugData string)

Source from the content-addressed store, hash-verified

1370}
1371
1372func (t *http2Server) Drain(debugData string) {
1373 t.mu.Lock()
1374 defer t.mu.Unlock()
1375 if t.drainEvent != nil {
1376 return
1377 }
1378 t.drainEvent = grpcsync.NewEvent()
1379 t.controlBuf.put(&goAway{code: http2.ErrCodeNo, debugData: []byte(debugData), headsUp: true})
1380}
1381
1382var goAwayPing = &ping{data: [8]byte{1, 6, 1, 8, 0, 3, 3, 9}}
1383

Callers 1

keepaliveMethod · 0.95

Calls 4

NewEventFunction · 0.92
LockMethod · 0.45
UnlockMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected