/**
 * 
 */
package org.springblade.system.client.factory;

import java.util.List;

import org.springblade.system.client.DatasourceFunctionClient;
import org.springblade.system.client.model.DatasouceFunctionModel;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * @author wookvn
 *
 */
@Slf4j
@Component
public class DatasourceFunctionFallbackFactory implements FallbackFactory<DatasourceFunctionClient> {

	@Override
	public DatasourceFunctionClient create(Throwable cause) {
		log.error("DatasourceFunctionClient invoke fallback:{}", cause.getMessage());
		return new DatasourceFunctionClient() {
			
			@Override
			public List<DatasouceFunctionModel> list(Integer dsType, String tenantId) {
				return null;
			}
		};
	}

}
