1 Star 1 Fork 0

AliyunContainerService/open-service-broker-alibabacloud

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 807 Bytes
一键复制 编辑 原始数据 按行查看 历史
Kai Zhang 提交于 2018-08-29 10:35 . Initial commit
package main
import (
"context"
"flag"
"fmt"
"os"
"path"
"strconv"
"github.com/AliyunContainerService/open-service-broker-alibabacloud/pkg/controller"
"github.com/AliyunContainerService/open-service-broker-alibabacloud/pkg/server"
"github.com/golang/glog"
)
var options struct {
Port int
}
func init() {
flag.IntVar(&options.Port, "port", 8005, "use '--port' option to specify the port for broker to listen on")
flag.Parse()
}
func main() {
if flag.Arg(0) == "version" {
fmt.Printf("%s/%s\n", path.Base(os.Args[0]), "UNKNOWN")
return
}
controller := controller.NewBaseController()
err := server.Run(context.Background(), ":"+strconv.Itoa(options.Port), controller)
if err != nil {
glog.Errorf("Alibaba Cloud Service Broker Server failed to start. Error: %v", err.Error())
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/AliyunContainerService/open-service-broker-alibabacloud.git
git@gitee.com:AliyunContainerService/open-service-broker-alibabacloud.git
AliyunContainerService
open-service-broker-alibabacloud
open-service-broker-alibabacloud
master

搜索帮助