package cn.reghao.autodop.dagent.app;

import cn.reghao.autodop.common.msg.rpc.dto.app.AppStatus;
import cn.reghao.autodop.common.msg.rpc.dto.app.DeployParam;
import cn.reghao.autodop.common.dagent.app.log.AppLogArgs;
import cn.reghao.autodop.common.dagent.app.log.LogFile;
import cn.reghao.autodop.common.docker.exception.DockerException;

import java.util.List;

/**
 * @author reghao
 * @date 2021-02-22 16:21:28
 */
public interface AppService {
    AppStatus deploy(DeployParam deployParam) throws DockerException;
    AppStatus status(String appId) throws DockerException;
    AppStatus restart(String appId) throws DockerException;
    AppStatus stop(String appId) throws DockerException;
    AppStatus start(String appId) throws DockerException;
    /**
     * 日志文件列表
     *
     * @param
     * @return
     * @date 2021-02-26 下午3:25
     */
    List<LogFile> logFiles(AppLogArgs appLogArgs) throws DockerException;

    /**
     * 日志内容
     *
     * @param
     * @return
     * @date 2021-02-26 下午3:26
     */
    List<String> logContent(AppLogArgs appLogArgs) throws DockerException;
}
