本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/clientset_generated/internalclientset.Interface.Certificates方法的典型用法代码示例。如果您正苦于以下问题:Golang Interface.Certificates方法的具体用法?Golang Interface.Certificates怎么用?Golang Interface.Certificates使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类k8s/io/kubernetes/pkg/client/clientset_generated/internalclientset.Interface
的用法示例。
在下文中一共展示了Interface.Certificates方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: newCertificateSigningRequestInformer
func newCertificateSigningRequestInformer(client internalclientset.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
sharedIndexInformer := cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
var internalOptions api.ListOptions
if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil {
return nil, err
}
return client.Certificates().CertificateSigningRequests().List(internalOptions)
},
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
var internalOptions api.ListOptions
if err := api.Scheme.Convert(&options, &internalOptions, nil); err != nil {
return nil, err
}
return client.Certificates().CertificateSigningRequests().Watch(internalOptions)
},
},
&certificates.CertificateSigningRequest{},
resyncPeriod,
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
)
return sharedIndexInformer
}