MCPcopy Index your code
hub / github.com/git-bug/git-bug / queryImport

Method queryImport

bridge/github/client.go:49–61  ·  view source on GitHub ↗

queryImport calls the github api with a graphql query, and sends an ImportEvent for each rate limiting event

(ctx context.Context, query interface{}, vars map[string]interface{}, importEvents chan<- ImportEvent)

Source from the content-addressed store, hash-verified

47
48// queryImport calls the github api with a graphql query, and sends an ImportEvent for each rate limiting event
49func (c *rateLimitHandlerClient) queryImport(ctx context.Context, query interface{}, vars map[string]interface{}, importEvents chan<- ImportEvent) error {
50 // prepare a closure for the query
51 queryFun := func(ctx context.Context) error {
52 return c.sc.Query(ctx, query, vars)
53 }
54 callback := func(msg string) {
55 select {
56 case <-ctx.Done():
57 case importEvents <- RateLimitingEvent{msg}:
58 }
59 }
60 return c.callAPIAndRetry(ctx, queryFun, callback)
61}
62
63// queryExport calls the github api with a graphql query, and sends a core.ExportResult for each rate limiting event
64func (c *rateLimitHandlerClient) queryExport(ctx context.Context, query interface{}, vars map[string]interface{}, out chan<- core.ExportResult) error {

Callers 5

UserMethod · 0.80
queryIssueEditsMethod · 0.80
queryTimelineMethod · 0.80
queryCommentEditsMethod · 0.80
queryIssueMethod · 0.80

Calls 2

callAPIAndRetryMethod · 0.95
QueryMethod · 0.65

Tested by

no test coverage detected