import { Broker, ClusterName, BrokerMetrics, } from 'redux/interfaces'; import { BASE_URL, BASE_PARAMS, } from 'lib/constants'; export const getBrokers = (clusterName: ClusterName): Promise => fetch(`${BASE_URL}/clusters/${clusterName}/brokers`, { ...BASE_PARAMS }) .then(res => res.json()); export const getBrokerMetrics = (clusterName: ClusterName): Promise => fetch(`${BASE_URL}/clusters/${clusterName}/metrics/broker`, { ...BASE_PARAMS }) .then(res => res.json());