package cn.reghao.bnt.web.devops.machine.service;

import cn.reghao.bnt.web.util.SelectOption;
import cn.reghao.bnt.web.devops.machine.model.po.MachineHost;
import cn.reghao.bnt.web.devops.machine.model.po.MachineInfo;
import cn.reghao.bnt.web.devops.machine.model.vo.MachineDetail;
import cn.reghao.bnt.web.devops.machine.model.vo.MachineStat;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * @author reghao
 * @date 2024-08-04 19:57:45
 */
public interface MachineQuery {
    Page<MachineDetail> getMachineHostByPage(String env, Pageable pageable);
    /**
     * 获取节点上部署的应用列表
     *
     * @param
     * @return
     * @date 2025-09-19 14:52:49
     */
    List<SelectOption> getMachineApps(String machineId);
    /**
     * 获取机器节点的状态列表
     *
     * @param
     * @return
     * @date 2025-09-19 15:37:17
     */
    List<MachineStat> getMachineStats();
    MachineHost getMachineHost(String machineId);
    List<MachineInfo> getMachineInfos(List<String> machineIds);
    List<SelectOption> getOnlineMachines(String env);
    boolean isAgentOnline(String machineId);
}
