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; }
public WatcherJobFactory(ILogger <WatcherJobFactory <T> > log, IEnumerable <IWatcherEventHandler <T> > handlers) { _log = log; _handlers = handlers; _customResourceDetails = typeof(T).GetTypeInfo().GetCustomAttribute <CustomResourceAttribute>(); }