import { OnDestroy } from "@angular/core"; import { Observable, Subject, Subscriber, Subscription } from "rxjs"; import { NamespacedResourceService } from "../service/namespaced.resource.service"; import { KubernetesResource } from "../model/kubernetesresource.model"; import { Services } from "../model/service.model"; import { RouteService } from "../service/route.service"; import { ServiceService } from "../service/service.service"; import { Watcher } from "../service/watcher"; import { DeploymentService } from "../service/deployment.service"; import { DeploymentConfigService } from "../service/deploymentconfig.service"; import { DeploymentViews } from "../view/deployment.view"; import { Deployments } from "../model/deployment.model"; import { ReplicationControllerService } from "../service/replicationcontroller.service"; import { ReplicaSetViews } from "../view/replicaset.view"; import { ReplicaSetService } from "../service/replicaset.service"; /** * A base class for components which watch kubernetes resources which contains a number of helper functions * for watching various kinds of resources in kubernetes together with logic to help close up watches after the * component has been used */ export declare class AbstractWatchComponent implements OnDestroy { subjectCache: Map>; private watchCache; ngOnDestroy(): void; protected listAndWatchServices(namespace: string, serviceService: ServiceService, routeService: RouteService): Observable; listAndWatchCombinedDeployments(namespace: string, deploymentService: DeploymentService, deploymentConfigService: DeploymentConfigService): Observable; listAndWatchDeployments(namespace: string, deploymentService: DeploymentService, deploymentConfigService: DeploymentConfigService, serviceService: ServiceService, routeService: RouteService): Observable; listAndWatchReplicas(namespace: string, replicaSetService: ReplicaSetService, replicationControllerService: ReplicationControllerService, serviceService: ServiceService, routeService: RouteService): Observable; protected listAndWatch>(service: NamespacedResourceService, namespace: string, type: { new (): T; }): Observable; protected getOrCreateSubject>(key: string, createObserverFn: () => Observable): Observable; protected getOrCreateWatch>(service: NamespacedResourceService, namespace: string, type: { new (): T; }): Watcher; /** * Lets combine the web socket events with the latest list */ protected combineListAndWatchEvent>(array: L, msg: any, service: NamespacedResourceService, objType: { new (): T; }, namespace: string): L; protected upsertItem>(array: L, resource: any, service: NamespacedResourceService, type: { new (): T; }): L; protected deleteItemFromArray>(array: L, resource: any): L; nameOfResource(resource: any): any; } /** * Lets send the last value to any new subscriber before any new values. * * Unlike BehaviorSubject there is no need for an initial value. * Unlike AsyncSubject we don't need to wait for complete before sending a next event */ export declare class CachingSubject extends Subject { protected observable: Observable; private _value; private _hasValue; private _subscription; constructor(observable: Observable); unsubscribe(): void; next(value?: T): void; protected _subscribe(subscriber: Subscriber): Subscription; }