package com.friday.operation.api.executor.service;

import com.friday.base.common.response.DubboResult;
import com.friday.operation.api.executor.dto.module.InvokeDto;
import com.friday.operation.api.executor.dto.module.ModuleDto;
import com.friday.operation.api.executor.dto.module.ModuleFilter;
import com.friday.operation.api.executor.dto.module.ModuleRegisterDto;

import java.util.ArrayList;

/**
 * @Author YaoYao
 * @Date Created In 10:55 2023/3/3
 * @Description 热部署运行模块服务
 * @Modified By
 */
public interface IDynamicModuleService {
    /**
     * 注册模块
     */
    DubboResult<ModuleDto> registerModule(ModuleRegisterDto register);

    /**
     * 注销模块
     */
    DubboResult removeModule(String moduleName, String moduleVersion);

    /**
     * 查询模块
     */
    DubboResult<ArrayList<ModuleDto>> queryModules(ModuleFilter filter);

    /**
     * 调用模块方法
     */
    DubboResult invoke(InvokeDto invoke);

}
