代码拉取完成,页面将自动刷新
package main
import (
"flag"
"github.com/pjoc-team/base-service/pkg/service"
"github.com/pjoc-team/channel-isppay/pkg/channel"
)
var (
listenAddr = flag.String("listen-addr", ":8084", "HTTP listen address.")
configURI = flag.String("c", "config.yaml", "uri to load config")
tlsEnable = flag.Bool("tls", false, "enable tls")
logLevel = flag.String("log-level", "debug", "logger level")
logFormat = flag.String("log-format", "text", "text or json")
caCert = flag.String("ca-cert", service.WithConfigDir("ca.pem"), "Trusted CA certificate.")
tlsCert = flag.String("tls-cert", service.WithConfigDir("cert.pem"), "TLS server certificate.")
tlsKey = flag.String("tls-key", service.WithConfigDir("key.pem"), "TLS server key.")
serviceName = flag.String("s", "", "PayGatewayService name in service discovery.")
registerServiceToEtcd = flag.Bool("r", true, "Register service to etcd.")
etcdPeers = flag.String("etcd-peers", "", "Etcd peers. example: 127.0.0.1:2379,127.0.0.1:12379")
)
func main() {
flag.Parse()
//serviceDir := gateway.ETCD_DIR_ROOT + "/services"
svc := service.InitService(*listenAddr,
*configURI,
*tlsEnable,
*logLevel,
*logFormat,
*caCert,
*tlsCert,
*tlsKey,
*serviceName,
*registerServiceToEtcd,
*etcdPeers,
"")
channel.Init(svc)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。