mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-22 13:17:07 +00:00
Fixes formatting and typos in client-go docs
Kubernetes-commit: d0de4483d51c5811202f1731a835c75d8fc8b30e
This commit is contained in:
parent
c850435001
commit
6db26dd413
2
tools/cache/controller.go
vendored
2
tools/cache/controller.go
vendored
@ -325,7 +325,7 @@ func NewInformer(
|
|||||||
return clientState, newInformer(lw, objType, resyncPeriod, h, clientState)
|
return clientState, newInformer(lw, objType, resyncPeriod, h, clientState)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewIndexerInformer returns a Indexer and a controller for populating the index
|
// NewIndexerInformer returns an Indexer and a Controller for populating the index
|
||||||
// while also providing event notifications. You should only used the returned
|
// while also providing event notifications. You should only used the returned
|
||||||
// Index for Get/List operations; Add/Modify/Deletes will cause the event
|
// Index for Get/List operations; Add/Modify/Deletes will cause the event
|
||||||
// notifications to be faulty.
|
// notifications to be faulty.
|
||||||
|
12
tools/cache/delta_fifo.go
vendored
12
tools/cache/delta_fifo.go
vendored
@ -153,7 +153,7 @@ const (
|
|||||||
// change happened, and the object's state after* that change.
|
// change happened, and the object's state after* that change.
|
||||||
//
|
//
|
||||||
// [*] Unless the change is a deletion, and then you'll get the final
|
// [*] Unless the change is a deletion, and then you'll get the final
|
||||||
// state of the object before it was deleted.
|
// state of the object before it was deleted.
|
||||||
type Delta struct {
|
type Delta struct {
|
||||||
Type DeltaType
|
Type DeltaType
|
||||||
Object interface{}
|
Object interface{}
|
||||||
@ -174,9 +174,10 @@ type Deltas []Delta
|
|||||||
// modifications.
|
// modifications.
|
||||||
//
|
//
|
||||||
// TODO: consider merging keyLister with this object, tracking a list of
|
// TODO: consider merging keyLister with this object, tracking a list of
|
||||||
// "known" keys when Pop() is called. Have to think about how that
|
// "known" keys when Pop() is called. Have to think about how that
|
||||||
// affects error retrying.
|
// affects error retrying.
|
||||||
// NOTE: It is possible to misuse this and cause a race when using an
|
//
|
||||||
|
// NOTE: It is possible to misuse this and cause a race when using an
|
||||||
// external known object source.
|
// external known object source.
|
||||||
// Whether there is a potential race depends on how the consumer
|
// Whether there is a potential race depends on how the consumer
|
||||||
// modifies knownObjects. In Pop(), process function is called under
|
// modifies knownObjects. In Pop(), process function is called under
|
||||||
@ -185,8 +186,7 @@ type Deltas []Delta
|
|||||||
//
|
//
|
||||||
// Example:
|
// Example:
|
||||||
// In case of sharedIndexInformer being a consumer
|
// In case of sharedIndexInformer being a consumer
|
||||||
// (https://github.com/kubernetes/kubernetes/blob/0cdd940f/staging/
|
// (https://github.com/kubernetes/kubernetes/blob/0cdd940f/staging/src/k8s.io/client-go/tools/cache/shared_informer.go#L192),
|
||||||
// src/k8s.io/client-go/tools/cache/shared_informer.go#L192),
|
|
||||||
// there is no race as knownObjects (s.indexer) is modified safely
|
// there is no race as knownObjects (s.indexer) is modified safely
|
||||||
// under DeltaFIFO's lock. The only exceptions are GetStore() and
|
// under DeltaFIFO's lock. The only exceptions are GetStore() and
|
||||||
// GetIndexer() methods, which expose ways to modify the underlying
|
// GetIndexer() methods, which expose ways to modify the underlying
|
||||||
|
Loading…
Reference in New Issue
Block a user