MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / NewManager

Function NewManager

datagramsession/manager.go:57–68  ·  view source on GitHub ↗
(log *zerolog.Logger, sendF transportSender, receiveChan <-chan *packet.Session)

Source from the content-addressed store, hash-verified

55}
56
57func NewManager(log *zerolog.Logger, sendF transportSender, receiveChan <-chan *packet.Session) *manager {
58 return &manager{
59 registrationChan: make(chan *registerSessionEvent),
60 unregistrationChan: make(chan *unregisterSessionEvent),
61 sendFunc: sendF,
62 receiveChan: receiveChan,
63 closedChan: make(chan struct{}),
64 sessions: make(map[uuid.UUID]*Session),
65 log: log,
66 timeout: defaultReqTimeout,
67 }
68}
69
70func (m *manager) UpdateLogger(log *zerolog.Logger) {
71 // Benign data race, no problem if the old pointer is read or not concurrently.

Callers 10

NewDatagramV2ConnectionFunction · 0.92
testTunnelConnectionFunction · 0.92
testSessionReturnsFunction · 0.85
TestZeroBytePayloadFunction · 0.85
TestManagerServeFunction · 0.85
TestTimeoutFunction · 0.85

Calls

no outgoing calls

Tested by 9

testTunnelConnectionFunction · 0.74
testSessionReturnsFunction · 0.68
TestZeroBytePayloadFunction · 0.68
TestManagerServeFunction · 0.68
TestTimeoutFunction · 0.68