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

Method registerPAF

js.go:814–825  ·  view source on GitHub ↗

registerPAF will register for a PubAckFuture.

(id string, paf *pubAckFuture)

Source from the content-addressed store, hash-verified

812
813// registerPAF will register for a PubAckFuture.
814func (js *js) registerPAF(id string, paf *pubAckFuture) (int, int) {
815 js.mu.Lock()
816 if js.pafs == nil {
817 js.pafs = make(map[string]*pubAckFuture)
818 }
819 paf.js = js
820 js.pafs[id] = paf
821 np := len(js.pafs)
822 maxpa := js.opts.maxpa
823 js.mu.Unlock()
824 return np, maxpa
825}
826
827// Lock should be held.
828func (js *js) getPAF(id string) *pubAckFuture {

Callers 1

PublishMsgAsyncMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected