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

Method registerPAF

jetstream/publish.go:613–623  ·  view source on GitHub ↗

registerPAF will register for a PubAckFuture.

(id string, paf *pubAckFuture)

Source from the content-addressed store, hash-verified

611
612// registerPAF will register for a PubAckFuture.
613func (js *jetStream) registerPAF(id string, paf *pubAckFuture) (int, int) {
614 js.publisher.Lock()
615 if js.publisher.acks == nil {
616 js.publisher.acks = make(map[string]*pubAckFuture)
617 }
618 js.publisher.acks[id] = paf
619 np := len(js.publisher.acks)
620 maxpa := js.publisher.asyncPublisherOpts.maxpa
621 js.publisher.Unlock()
622 return np, maxpa
623}
624
625// Lock should be held.
626func (js *jetStream) getPAF(id string) *pubAckFuture {

Callers 1

PublishMsgAsyncMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected