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

Method handle

pkg/workerpool/workerpool.go:87–93  ·  view source on GitHub ↗
(it *contextualItem[T])

Source from the content-addressed store, hash-verified

85}
86
87func (wp *workerPool[T]) handle(it *contextualItem[T]) {
88 registerWorkerBusy(wp.Name)
89 defer registerWorkerIdle(wp.Name)
90 defer registerWorkProcessed(it.ctx, wp.Name)
91 defer registerWorkLatency(wp.Name, time.Now())
92 wp.Handler(it.ctx, it.item)
93}
94
95func (wp *workerPool[T]) workerBody(initialWork *contextualItem[T]) func(context.Context) error {
96 worker := func(ctx context.Context) error {

Callers 1

workerBodyMethod · 0.95

Calls 6

registerWorkerBusyFunction · 0.85
registerWorkerIdleFunction · 0.85
registerWorkProcessedFunction · 0.85
registerWorkLatencyFunction · 0.85
HandlerMethod · 0.80
NowMethod · 0.65

Tested by

no test coverage detected