-
Notifications
You must be signed in to change notification settings - Fork 43
Endpoint: 依赖检查
YoyoFx edited this page Jul 27, 2020
·
2 revisions
使用Endpoints.UseViz 可以为应用程序及路由添加健康检查的Endpoint用于Http输出应用状态
func main() {
webHost := YoyoGo.CreateDefaultBuilder(func (router Router.IRouterBuilder) {
Endpoints.UseViz(router)
}
webHost.Run()
}
- 输出依赖图 : /actuator/graph?type=viz
- 依赖图字符串 : /actuator/graph
digraph {
subgraph cluster_s4 {
ID = "cluster_s4";
bgcolor="#E8E8E8";color="lightgrey";fontcolor="#46494C";fontname="COURIER";label="";style="rounded";
n7[color="#46494C",fontcolor="white",fontname="COURIER",label="*di.Graph",shape="box",style="filled"];
n6[color="#46494C",fontcolor="white",fontname="COURIER",label="di.Extractor",shape="box",style="filled"];
}subgraph cluster_s0 {
ID = "cluster_s0";
bgcolor="#E8E8E8";color="lightgrey";fontcolor="#46494C";fontname="COURIER";label="";style="rounded";
n1[color="#46494C",fontcolor="white",fontname="COURIER",label="*Abstractions.ApplicationLife",shape="box",style="filled"];
}subgraph cluster_s3 {
ID = "cluster_s3";
bgcolor="#E8E8E8";color="lightgrey";fontcolor="#46494C";fontname="COURIER";label="";style="rounded";
n5[color="#46494C",fontcolor="white",fontname="COURIER",label="*contollers.UserController[usercontroller]",shape="box",style="filled"];
}subgraph cluster_s2 {
ID = "cluster_s2";
bgcolor="#E8E8E8";color="lightgrey";fontcolor="#46494C";fontname="COURIER";label="";style="rounded";
n3[color="#46494C",fontcolor="white",fontname="COURIER",label="*models.UserAction",shape="box",style="filled"];
n4[color="#2589BD",fontcolor="white",fontname="COURIER",label="models.IUserAction",style="filled"];
}subgraph cluster_s1 {
ID = "cluster_s1";
bgcolor="#E8E8E8";color="lightgrey";fontcolor="#46494C";fontname="COURIER";label="";style="rounded";
n2[color="#46494C",fontcolor="white",fontname="COURIER",label="*Context.HostEnvironment",shape="box",style="filled"];
}splines="ortho";
n3->n4[color="#949494"];
n4->n5[color="#949494"];
}