MCPcopy
hub / github.com/nats-io/nats.go / Drain

Method Drain

enc.go:294–296  ·  view source on GitHub ↗

Drain will put a connection into a drain state. All subscriptions will immediately be put into a drain state. Upon completion, the publishers will be drained and can not publish any additional messages. Upon draining of the publishers, the connection will be closed. Use the ClosedCB() option to know

()

Source from the content-addressed store, hash-verified

292//
293// Deprecated: Encoded connections are no longer supported.
294func (c *EncodedConn) Drain() error {
295 return c.Conn.Drain()
296}
297
298// LastError reports the last error encountered via the Connection.
299//

Callers

nothing calls this directly

Calls 1

DrainMethod · 0.65

Tested by

no test coverage detected