You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
318 B
20 lines
318 B
10 months ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"k8s-manager/handler/node"
|
||
|
"k8s-manager/handler/sys"
|
||
|
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
// 初始化默认的路由引擎
|
||
|
r := gin.Default()
|
||
|
|
||
|
// 定义路由
|
||
|
r.GET("/ping", sys.Ping)
|
||
|
r.GET("/node/get", node.List)
|
||
|
|
||
|
r.Run(":8080") // 监听并在 0.0.0.0:8080 上启动服务
|
||
|
}
|