reactions

package
v1.135.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL