Commit 071c5f59 authored by gaoshiyao's avatar gaoshiyao

update

parent c60b5efd
...@@ -42,15 +42,15 @@ pipeline: ...@@ -42,15 +42,15 @@ pipeline:
target: REGISTRY_PASSWORD target: REGISTRY_PASSWORD
when: when:
branch: [master] branch: [master]
# deploy: deploy:
# image: registry-vpc.cn-qingdao.aliyuncs.com/wod-devops/kubernetes:1.0 image: registry-vpc.cn-qingdao.aliyuncs.com/wod-devops/kubernetes:1.0
# namespace: apaas namespace: cig
# deployment: apaas-meshproxy deployment: apaas-meshproxy
# container: apaas-meshproxy container: apaas-meshproxy
# registry: hub.wodcloud.com registry: hub.wodcloud.com
# secrets: secrets:
# - source: KUBERNETES_SERVER - source: KUBERNETES_SERVER
# target: KUBERNETES_SERVER target: KUBERNETES_SERVER
# - source: KUBERNETES_TOKEN - source: KUBERNETES_TOKEN
# target: KUBERNETES_TOKEN target: KUBERNETES_TOKEN
.vscode .vscode
.idea/ .idea/
vendor vendor
__debug_bin
\ No newline at end of file
...@@ -14,6 +14,7 @@ import ( ...@@ -14,6 +14,7 @@ import (
var ( var (
argPort = pflag.Int("port", 8088, "") argPort = pflag.Int("port", 8088, "")
argPrefix = pflag.String("prefix", "/vuemap", "")
redisUrl = pflag.String("redisUrl", "redis://redis:16379", "") redisUrl = pflag.String("redisUrl", "redis://redis:16379", "")
redisTag = pflag.String("redisTag", "apaas-mesh-proxy", "") redisTag = pflag.String("redisTag", "apaas-mesh-proxy", "")
) )
...@@ -24,8 +25,8 @@ func main() { ...@@ -24,8 +25,8 @@ func main() {
initConfig() initConfig()
proxyhandler, _ := handler.CreateProxyHandler() proxyhandler, _ := handler.CreateProxyHandler()
counthandler, _ := handler.CreateCountHandler() counthandler, _ := handler.CreateCountHandler()
http.Handle("/count", counthandler) http.Handle(fmt.Sprintf("%s%s", *argPrefix, "/count"), counthandler)
http.Handle("/", proxyhandler) http.Handle(*argPrefix+"/", proxyhandler)
if err := http.ListenAndServe(fmt.Sprintf(":%d", *argPort), nil); err != nil { if err := http.ListenAndServe(fmt.Sprintf(":%d", *argPort), nil); err != nil {
log.Error("Listen Server err:", err) log.Error("Listen Server err:", err)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment