package cn.reghao.autodop.dmaster.mqttsub.rpcresult;

import cn.reghao.autodop.common.mqtt.DefaultMqttClient;
import cn.reghao.autodop.common.msg.rpc.RpcResult;
import cn.reghao.autodop.common.msg.rpc.clazz.DockerRpcClazz;
import org.springframework.stereotype.Component;

/**
 * @author reghao
 * @date 2021-09-15 14:45:43
 */
@Component
public class DockerRpcClazzResult {
    private final DefaultMqttClient mqttClient;

    public DockerRpcClazzResult(DefaultMqttClient mqttClient) {
        this.mqttClient = mqttClient;
    }

    public void process(String msgId, String method, RpcResult rpcResult) {
        mqttClient.removeRecord(msgId);
        switch (DockerRpcClazz.valueOf(method)) {
            case dockerImage:
                break;
            default:
                ;
        }
    }
}
