@jfvilas/plugin-kwirth-log
Version:
Frontend plugin for viewing real-time Kubernetes logs in Backstage
31 lines (28 loc) • 911 B
JavaScript
import { getVersion, getInfo, getResources, requestAccess } from '@jfvilas/plugin-kwirth-common';
class KwirthLogClient {
discoveryApi;
fetchApi;
constructor(options) {
this.discoveryApi = options.discoveryApi;
this.fetchApi = options.fetchApi;
}
/**
*
* @param entity
* @returns an array of clusters (with their correpsonding info) and a pod list for each, where the entity has been dicovered
*/
async getVersion() {
return getVersion(this.discoveryApi, this.fetchApi);
}
async getInfo() {
return getInfo(this.discoveryApi, this.fetchApi);
}
async getResources(entity) {
return getResources(this.discoveryApi, this.fetchApi, entity);
}
async requestAccess(entity, channel, scopes) {
return requestAccess(this.discoveryApi, this.fetchApi, entity, channel, scopes);
}
}
export { KwirthLogClient };
//# sourceMappingURL=KwirthLogClient.esm.js.map