package digital.laboratory.platform.inspetion.api.feign.factory;

import digital.laboratory.platform.inspetion.api.feign.RemoteTestToIdentifyService;
import digital.laboratory.platform.inspetion.api.feign.fallback.RemoteTestToIdentifyServiceFallbackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @author xy
 * @version 1.0
 * @title RemoteFlowManagerServiceFallbackFactory
 * @description
 * @create 2024/1/17 18:07
 */
@Component
public class RemoteTestToIdentifyServiceFallbackFactory implements FallbackFactory<RemoteTestToIdentifyService> {
    @Override
    public RemoteTestToIdentifyService create(Throwable throwable) {
        RemoteTestToIdentifyServiceFallbackImpl remoteFlowManagerServiceFallback=new RemoteTestToIdentifyServiceFallbackImpl();
        remoteFlowManagerServiceFallback.setCause(throwable);
        return remoteFlowManagerServiceFallback;
    }
}
