Пример #1
0
 public NamespacedResourceWatcherFactory(KubernetesClientConfiguration config, IEnumerable <IWatcherEventHandler <T> > handlers)
 {
     _customResourceDetails = typeof(T).GetTypeInfo().GetCustomAttribute <CustomResourceAttribute>();
     _genericClient         = new GenericClient(config, _customResourceDetails.ApiGroup, _customResourceDetails.Version, _customResourceDetails.Plural);
     _client   = new Kubernetes(config);
     _handlers = handlers;
 }
Пример #2
0
 public WatcherJobFactory(ILogger <WatcherJobFactory <T> > log, IEnumerable <IWatcherEventHandler <T> > handlers)
 {
     _log      = log;
     _handlers = handlers;
     _customResourceDetails = typeof(T).GetTypeInfo().GetCustomAttribute <CustomResourceAttribute>();
 }