MCPcopy Index your code
hub / github.com/coder/coder / LastMessage

Method LastMessage

coderd/notifications/dispatch/smtptest/server.go:59–68  ·  view source on GitHub ↗

LastMessage returns a copy of the last message received by the backend.

()

Source from the content-addressed store, hash-verified

57// LastMessage returns a copy of the last message received by the
58// backend.
59func (b *Backend) LastMessage() *Message {
60 b.mu.Lock()
61 defer b.mu.Unlock()
62 if b.lastMsg == nil {
63 return nil
64 }
65 clone := *b.lastMsg
66 clone.To = slices.Clone(b.lastMsg.To)
67 return &clone
68}
69
70func (b *Backend) Reset() {
71 b.mu.Lock()

Callers 3

TestSMTPFunction · 0.95

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
CloneMethod · 0.45

Tested by 3

TestSMTPFunction · 0.76