MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / New

Function New

pkg/errorcontext/errorcontext.go:56–60  ·  view source on GitHub ↗

New returns a new ErrorContext that extends the parent context

(parent context.Context)

Source from the content-addressed store, hash-verified

54
55// New returns a new ErrorContext that extends the parent context
56func New(parent context.Context) (context.Context, CancelFunc) {
57 parent, cancel := context.WithCancel(parent)
58 ctx := &ErrorContext{Context: parent, cancel: cancel}
59 return ctx, ctx.Cancel
60}

Callers 15

ExampleErrorContextFunction · 0.92
TestErrorContextFunction · 0.92
handleEventsMethod · 0.92
RunMethod · 0.92
runTestSubscriptionsFunction · 0.92
SubscribeMethod · 0.92
TestUpdateVersionInfoFunction · 0.92
TestBatchGetStatusFunction · 0.92
NewConnectionFunction · 0.92
TestFrontendFunction · 0.92
TestFrontendFunction · 0.92
FrontendFunction · 0.92

Calls

no outgoing calls

Tested by 11

ExampleErrorContextFunction · 0.74
TestErrorContextFunction · 0.74
runTestSubscriptionsFunction · 0.74
TestUpdateVersionInfoFunction · 0.74
TestBatchGetStatusFunction · 0.74
TestFrontendFunction · 0.74
TestFrontendFunction · 0.74
TestFrontendFunction · 0.74
TestFrontendFunction · 0.74
TestContextParentFunction · 0.74
TestContextRootFunction · 0.74