@@ -112,7 +112,7 @@ Indexer 接口的 `AddIndexers()` 方法为对象添加索引函数,从而为
112112
113113前面说过,索引值和对象(用它的唯一表示 Key 表示)是一对多映射关系。
114114
115- + ` Index ` :保存索引匹配的对象集合(对象 Key);
115+ + ` Index ` :保存索引匹配的对象集合(对象 Key);
116116+ ` Indices ` :保存某个索引函数生成的所有索引的对象集合;
117117
118118``` go
@@ -209,7 +209,7 @@ type ThreadSafeStore interface {
209209 Replace (map [string ]interface {}, string )
210210 Resync () error
211211
212- // 下面这些是 Indexer 定义的接口方法
212+ // 下面这些是 Indexer 定义的接口方法
213213 Index (indexName string , obj interface {}) ([]interface {}, error )
214214 IndexKeys (indexName, indexKey string ) ([]string , error )
215215 ListIndexFuncValues (name string ) []string
@@ -418,7 +418,7 @@ func DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error) {
418418
419419与 ` MetaNamespaceKeyFunc() ` 功能相反的是 ` SplitMetaNamespaceKey() ` 函数,它将传入的 Key 分解,返回对象所在的命名空间和对象名称。
420420
421- 讲完 ` KeyFunc ` 函数类型及其实例,我们再来分析内置类型 ` struct cache ` 。
421+ 讲完 ` KeyFunc ` 函数类型及其实例,我们再来分析内置类型 ` struct cache ` 。
422422
423423` cache ` 实现了 ` Indexer ` 和 ` Store ` 接口,函数 ` NewIndexer() ` 和 ` NewStore() ` 均返回该类型的对象:
424424
0 commit comments