MCPcopy
hub / github.com/ossf/scorecard / Next

Method Next

clients/githubrepo/roundtripper/tokens/rpc.go:30–37  ·  view source on GitHub ↗

Next requests for the next available GitHub token. Server blocks the call until a token becomes available.

(args struct{}, token *Token)

Source from the content-addressed store, hash-verified

28// Next requests for the next available GitHub token.
29// Server blocks the call until a token becomes available.
30func (accessor *TokenOverRPC) Next(args struct{}, token *Token) error {
31 id, val := accessor.client.Next()
32 *token = Token{
33 ID: id,
34 Value: val,
35 }
36 return nil
37}
38
39// Release inserts the token at `index` back into the token pool to be used by another client.
40func (accessor *TokenOverRPC) Release(id uint64, reply *struct{}) error {

Callers 1

TestTokenOverRPC_NextFunction · 0.95

Calls 1

NextMethod · 0.65

Tested by 1

TestTokenOverRPC_NextFunction · 0.76