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

Method queryExport

bridge/github/client.go:64–76  ·  view source on GitHub ↗

queryExport calls the github api with a graphql query, and sends a core.ExportResult for each rate limiting event

(ctx context.Context, query interface{}, vars map[string]interface{}, out chan<- core.ExportResult)

Source from the content-addressed store, hash-verified

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 {
65 // prepare a closure for the query
66 queryFun := func(ctx context.Context) error {
67 return c.sc.Query(ctx, query, vars)
68 }
69 callback := func(msg string) {
70 select {
71 case <-ctx.Done():
72 case out <- core.NewExportRateLimiting(msg):
73 }
74 }
75 return c.callAPIAndRetry(ctx, queryFun, callback)
76}
77
78// queryPrintMsgs calls the github api with a graphql query, and prints a message to stdout for every rate limiting event .
79func (c *rateLimitHandlerClient) queryPrintMsgs(ctx context.Context, query interface{}, vars map[string]interface{}) error {

Callers 1

cacheGithubLabelsMethod · 0.80

Calls 3

callAPIAndRetryMethod · 0.95
NewExportRateLimitingFunction · 0.92
QueryMethod · 0.65

Tested by

no test coverage detected