@@ -42,17 +42,18 @@ import (
42
42
43
43
// InformersOpts configures an InformerMap.
44
44
type InformersOpts struct {
45
- HTTPClient * http.Client
46
- Scheme * runtime.Scheme
47
- Mapper meta.RESTMapper
48
- ResyncPeriod time.Duration
49
- Namespace string
50
- NewInformer * func (cache.ListerWatcher , runtime.Object , time.Duration , cache.Indexers ) cache.SharedIndexInformer
51
- Selector Selector
52
- Transform cache.TransformFunc
53
- UnsafeDisableDeepCopy bool
54
- EnableWatchBookmarks bool
55
- WatchErrorHandler cache.WatchErrorHandler
45
+ HTTPClient * http.Client
46
+ Scheme * runtime.Scheme
47
+ CodecFactoryOptionsMutators []serializer.CodecFactoryOptionsMutator
48
+ Mapper meta.RESTMapper
49
+ ResyncPeriod time.Duration
50
+ Namespace string
51
+ NewInformer * func (cache.ListerWatcher , runtime.Object , time.Duration , cache.Indexers ) cache.SharedIndexInformer
52
+ Selector Selector
53
+ Transform cache.TransformFunc
54
+ UnsafeDisableDeepCopy bool
55
+ EnableWatchBookmarks bool
56
+ WatchErrorHandler cache.WatchErrorHandler
56
57
}
57
58
58
59
// NewInformers creates a new InformersMap that can create informers under the hood.
@@ -71,7 +72,7 @@ func NewInformers(config *rest.Config, options *InformersOpts) *Informers {
71
72
Unstructured : make (map [schema.GroupVersionKind ]* Cache ),
72
73
Metadata : make (map [schema.GroupVersionKind ]* Cache ),
73
74
},
74
- codecs : serializer .NewCodecFactory (options .Scheme ),
75
+ codecs : serializer .NewCodecFactory (options .Scheme , options . CodecFactoryOptionsMutators ... ),
75
76
paramCodec : runtime .NewParameterCodec (options .Scheme ),
76
77
resync : options .ResyncPeriod ,
77
78
startWait : make (chan struct {}),
0 commit comments