Documentation
¶
Overview ¶
Package pulllock is the cross-process gate between image pulls (held shared by every runner's Docker proxy, which lives in its own process) and image GC (held exclusively around a prune pass).
Two flock(2) files implement a writer-preferring lock so a steady stream of overlapping pulls cannot starve GC: <path>.gate is held shared, briefly, by a pull while it takes <path>; GC holds <path>.gate exclusively for the whole pass, which keeps new pulls out, and then takes <path> exclusively, which waits for the pulls already running.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exclusive ¶
type Exclusive struct {
// contains filtered or unexported fields
}
Exclusive is the held exclusive side.
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is a held lock; Close releases it.
type Gate ¶
type Gate struct {
// contains filtered or unexported fields
}
Gate adapts a Lock to the Pause/Resume/InFlight shape of imagegc.PullGate. Pause keeps new pulls out; InFlight reports 1 until the pulls already running have finished, then 0 (and stays 0 while paused, since nothing can start). Resume lets pulls go again. Calls nest.
type Lock ¶
type Lock struct {
// contains filtered or unexported fields
}
Lock is the pair of lock files next to path.