mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-31 23:00:26 +00:00
Merge pull request #91174 from jqmichael/updateHasSyncDoc
Polished up comments around HasSynced() Kubernetes-commit: e5ead81bb00379b0c889499a9e5aa69f031a122e
This commit is contained in:
commit
55f6825a59
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -436,7 +436,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api",
|
||||
"Rev": "2543aba0e237"
|
||||
"Rev": "dccc90724807"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery",
|
||||
|
4
go.mod
4
go.mod
@ -26,7 +26,7 @@ require (
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0
|
||||
k8s.io/api v0.0.0-20200519082056-2543aba0e237
|
||||
k8s.io/api v0.0.0-20200519082057-dccc90724807
|
||||
k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675
|
||||
k8s.io/klog/v2 v2.0.0
|
||||
k8s.io/utils v0.0.0-20200414100711-2df71ebbae66
|
||||
@ -36,6 +36,6 @@ require (
|
||||
replace (
|
||||
golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13
|
||||
golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13
|
||||
k8s.io/api => k8s.io/api v0.0.0-20200519082056-2543aba0e237
|
||||
k8s.io/api => k8s.io/api v0.0.0-20200519082057-dccc90724807
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675
|
||||
)
|
||||
|
2
go.sum
2
go.sum
@ -284,7 +284,7 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
|
||||
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
k8s.io/api v0.0.0-20200519082056-2543aba0e237/go.mod h1:Q6M7crZfx9Kr6X36KdNV/vN9ZDm0zhlCbCjafx7a6LY=
|
||||
k8s.io/api v0.0.0-20200519082057-dccc90724807/go.mod h1:Q6M7crZfx9Kr6X36KdNV/vN9ZDm0zhlCbCjafx7a6LY=
|
||||
k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675/go.mod h1:x4z2+k1N0YTBvV8PmaVs4/hSmKVVENZmTqI8gBygpLA=
|
||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok=
|
||||
|
6
tools/cache/fifo.go
vendored
6
tools/cache/fifo.go
vendored
@ -71,8 +71,8 @@ type Queue interface {
|
||||
|
||||
// HasSynced returns true if the first batch of keys have all been
|
||||
// popped. The first batch of keys are those of the first Replace
|
||||
// operation if that happened before any Add, Update, or Delete;
|
||||
// otherwise the first batch is empty.
|
||||
// operation if that happened before any Add, AddIfNotPresent,
|
||||
// Update, or Delete; otherwise the first batch is empty.
|
||||
HasSynced() bool
|
||||
|
||||
// Close the queue
|
||||
@ -145,7 +145,7 @@ func (f *FIFO) Close() {
|
||||
}
|
||||
|
||||
// HasSynced returns true if an Add/Update/Delete/AddIfNotPresent are called first,
|
||||
// or an Update called first but the first batch of items inserted by Replace() has been popped
|
||||
// or the first batch of items inserted by Replace() has been popped.
|
||||
func (f *FIFO) HasSynced() bool {
|
||||
f.lock.Lock()
|
||||
defer f.lock.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user