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

Function NewMsg

nats.go:4275–4280  ·  view source on GitHub ↗

NewMsg creates a message for publishing that will use headers.

(subject string)

Source from the content-addressed store, hash-verified

4273
4274// NewMsg creates a message for publishing that will use headers.
4275func NewMsg(subject string) *Msg {
4276 return &Msg{
4277 Subject: subject,
4278 Header: make(Header),
4279 }
4280}
4281
4282const (
4283 hdrLine = "NATS/1.0\r\n"

Callers 6

DeleteMethod · 0.85
TestHeaderMultiLineFunction · 0.85
BenchmarkHeaderDecodeFunction · 0.85
PutMethod · 0.85
publishMetaFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestHeaderMultiLineFunction · 0.68
BenchmarkHeaderDecodeFunction · 0.68