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

Method queryPrintMsgs

bridge/github/client.go:79–88  ·  view source on GitHub ↗

queryPrintMsgs calls the github api with a graphql query, and prints a message to stdout for every rate limiting event .

(ctx context.Context, query interface{}, vars map[string]interface{})

Source from the content-addressed store, hash-verified

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 {
80 // prepare a closure for the query
81 queryFun := func(ctx context.Context) error {
82 return c.sc.Query(ctx, query, vars)
83 }
84 callback := func(msg string) {
85 fmt.Println(msg)
86 }
87 return c.callAPIAndRetry(ctx, queryFun, callback)
88}
89
90// callAPIAndRetry calls the Github GraphQL API (indirectly through callAPIDealWithLimit) and in
91// case of error it repeats the request to the Github API. The parameter `apiCall` is intended to be

Callers 1

getLoginFromTokenFunction · 0.80

Calls 3

callAPIAndRetryMethod · 0.95
QueryMethod · 0.65
PrintlnMethod · 0.65

Tested by

no test coverage detected