Documentation ¶
Overview ¶
Package tokens defines interface to access GitHub PATs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenAccessor ¶
TokenAccessor interface defines a `retrieve-once` data structure. Implementations of this interface must be thread-safe.
func MakeTokenAccessor ¶
func MakeTokenAccessor() TokenAccessor
MakeTokenAccessor is a factory function of TokenAccessor.
type TokenOverRPC ¶
type TokenOverRPC struct {
// contains filtered or unexported fields
}
TokenOverRPC is an RPC handler implementation for Golang RPCs.
func NewTokenOverRPC ¶
func NewTokenOverRPC(client TokenAccessor) *TokenOverRPC
NewTokenOverRPC creates a new instance of TokenOverRPC.
func (*TokenOverRPC) Next ¶
func (accessor *TokenOverRPC) Next(args struct{}, token *Token) error
Next requests for the next available GitHub token. Server blocks the call until a token becomes available.
func (*TokenOverRPC) Release ¶
func (accessor *TokenOverRPC) Release(id uint64, reply *struct{}) error
Release inserts the token at `index` back into the token pool to be used by another client.
Click to show internal directories.
Click to hide internal directories.