ITPub博客

首页 > 自动化运维 > 应用服务器 > Docker+Kubernetes(k8s)微服务容器化实践

Docker+Kubernetes(k8s)微服务容器化实践

原创 应用服务器 作者:呼勺要b3 时间:2019-06-13 20:51:33 0 删除 编辑
let 前往下载 = " http://icourse8.com/Docker_Kubernetes_k8s.html ";


章节信息

第1章 初识微服务

第2章 微服务带来的问题及解决方案分析

第3章 微服务开发

第4章 服务编排前奏

第5章 服务编排-Mesos

第6章 服务编排-DockerSwarm

第7章 服务编排-Kubernetes

第8章 CICD和DevOps

第9章 课程总结

class Solution {public:    //拓扑排序,判断有无环,三步走
    bool canFinish(int num, vector<pair<int, int>>& pre) {
        vector<int> indegree(num,0);        for(int i=0;i<pre.size();i++){            auto now = pre[i];
            indegree[now.first]++;                 //step1
        }
        queue<int> q;        for(int i=0;i<num;i++){            if(indegree[i]==0){                       //step2
                q.push(i);
            }
        }        int cnt = 0;        while(!q.empty()){            int front = q.front();
            q.pop();
            cnt++;            for(int i=0;i<pre.size();i++){                auto now = pre[i];                if(now.second==front){
                    indegree[now.first]--;                    if(indegree[now.first]==0){   //step3
                        q.push(now.first);
                    }
                }
            }
        }        return cnt==num;
    }
};


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31551894/viewspace-2647586/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 快乐数
请登录后发表评论 登录
全部评论

注册时间:2019-04-17

  • 博文量
    7
  • 访问量
    8625