@@ -42,17 +42,18 @@ import (
4242
4343// InformersOpts configures an InformerMap.
4444type 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
5657}
5758
5859// NewInformers creates a new InformersMap that can create informers under the hood.
@@ -71,7 +72,7 @@ func NewInformers(config *rest.Config, options *InformersOpts) *Informers {
7172 Unstructured : make (map [schema.GroupVersionKind ]* Cache ),
7273 Metadata : make (map [schema.GroupVersionKind ]* Cache ),
7374 },
74- codecs : serializer .NewCodecFactory (options .Scheme ),
75+ codecs : serializer .NewCodecFactory (options .Scheme , options . CodecFactoryOptionsMutators ... ),
7576 paramCodec : runtime .NewParameterCodec (options .Scheme ),
7677 resync : options .ResyncPeriod ,
7778 startWait : make (chan struct {}),
0 commit comments