Documentation
¶
Overview ¶
Package reactions provides a shared concurrent helper for fetching emoji reactions on comments. The same bounded-worker-pool pattern was previously duplicated in pkg/cmd/pr and pkg/cmd/mcp; this package is the single source.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchConcurrentByID ¶
func FetchConcurrentByID( ids []int, fetchFn func(id int) ([]backend.CommentReaction, error), ) ([][]backend.CommentReaction, error)
FetchConcurrentByID fetches reactions for each comment ID concurrently using a bounded worker pool of 4 goroutines. The returned slice is in the same order as ids. fetchFn is called once per ID.
Errors from individual workers are collected and joined into a single non-nil error return; partial results are always returned alongside any error so callers can choose to show partial data with a warning rather than failing completely.
Types ¶
This section is empty.