Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
Locker guards one file against other goroutines with an RWMutex, and against other processes with a lock file. Both spin on a try-lock, so neither is fair: a writer cannot preempt a steady stream of readers, and every holder has to release quickly. That is the bargain the token cache is built on — a read is one field, a write is one token refresh.
Click to show internal directories.
Click to hide internal directories.