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

Method initNewResp

nats.go:4742–4748  ·  view source on GitHub ↗

Function to init new response structures.

()

Source from the content-addressed store, hash-verified

4740
4741// Function to init new response structures.
4742func (nc *Conn) initNewResp() {
4743 nc.respSubPrefix = fmt.Sprintf("%s.", nc.NewInbox())
4744 nc.respSubLen = len(nc.respSubPrefix)
4745 nc.respSub = fmt.Sprintf("%s*", nc.respSubPrefix)
4746 nc.respMap = make(map[string]chan *Msg)
4747 nc.respRand = rand.New(rand.NewSource(time.Now().UnixNano()))
4748}
4749
4750// newRespInbox creates a new literal response subject
4751// that will trigger the mux subscription handler.

Callers 1

newRespInboxMethod · 0.95

Calls 1

NewInboxMethod · 0.95

Tested by

no test coverage detected