码迷,mamicode.com
首页 > 其他好文 > 详细

Eureka Server 代码分析01

时间:2019-06-23 21:03:28      阅读:104      评论:0      收藏:0      [点我收藏+]

标签:failed   eureka   start   ignore   default   llb   uppercase   traffic   logger   

Eureka Server 配置

InstanceStatus: 实例状态
    public enum InstanceStatus {
        UP, // Ready to receive traffic 准备接收通信(流量)
        DOWN, // Do not send traffic- healthcheck callback failed 不发送流量,服务健康检查调用失败
        STARTING, // Just about starting- initializations to be done - do not
        // send traffic
        OUT_OF_SERVICE, // Intentionally shutdown for traffic 故意关闭流量
        UNKNOWN;

        public static InstanceStatus toEnum(String s) {
            if (s != null) {
                try {
                    return InstanceStatus.valueOf(s.toUpperCase());
                } catch (IllegalArgumentException e) {
                    // ignore and fall through to unknown
                    logger.debug("illegal argument supplied to InstanceStatus.valueOf: {}, defaulting to {}", s, UNKNOWN);
                }
            }
            return UNKNOWN;
        }
    }

 

Eureka Server 代码分析01

标签:failed   eureka   start   ignore   default   llb   uppercase   traffic   logger   

原文地址:https://www.cnblogs.com/zhujunhuawoaini/p/11073774.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!