@jfvilas/plugin-kwirth-log
Version:
Frontend plugin for viewing real-time Kubernetes logs in Backstage
40 lines (35 loc) • 1.67 kB
TypeScript
import * as react from 'react';
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';
import { Entity } from '@backstage/catalog-model';
import { InstanceConfigScopeEnum } from '@jfvilas/kwirth-common';
import { ClusterValidPods } from '@jfvilas/plugin-kwirth-common';
declare const kwirthLogPlugin: _backstage_core_plugin_api.BackstagePlugin<{
root: _backstage_core_plugin_api.RouteRef<undefined>;
}, {}, {}>;
declare const EntityKwirthLogContent: () => react.JSX.Element;
interface KwirthLogApi {
getResources(entity: Entity): Promise<any>;
requestAccess(entity: Entity, channel: string, scopes: InstanceConfigScopeEnum[]): Promise<ClusterValidPods[]>;
getVersion(): Promise<any>;
}
declare const kwirthLogApiRef: _backstage_core_plugin_api.ApiRef<KwirthLogApi>;
interface KwirthLogClientOptions {
discoveryApi: DiscoveryApi;
fetchApi: FetchApi;
}
declare class KwirthLogClient implements KwirthLogApi {
private readonly discoveryApi;
private readonly fetchApi;
constructor(options: KwirthLogClientOptions);
/**
*
* @param entity
* @returns an array of clusters (with their correpsonding info) and a pod list for each, where the entity has been dicovered
*/
getVersion(): Promise<string>;
getResources(entity: Entity): Promise<ClusterValidPods>;
requestAccess(entity: Entity, channel: string, scopes: InstanceConfigScopeEnum[]): Promise<ClusterValidPods[]>;
}
export { EntityKwirthLogContent, KwirthLogClient, kwirthLogApiRef, kwirthLogPlugin };
export type { KwirthLogApi, KwirthLogClientOptions };