-
Notifications
You must be signed in to change notification settings - Fork 263
/
server_.go
64 lines (56 loc) · 2.19 KB
/
server_.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package service
import (
"github.com/ixre/go2o/core/domain/interface/registry"
"github.com/ixre/go2o/core/service/impl"
"github.com/ixre/gof"
)
/**
* Copyright (C) 2007-2020 56X.NET,All rights reserved.
*
* name : server_.go
* author : jarrysix (jarrysix#gmail.com)
* date : 2020-10-09 17:33
* description :
* history :
*/
// RPC服务初始化
func prepareRpcServer(ctx gof.App) {
gf := ctx.Config().GetString
//ssl := gf("ssl_enabled")
//prefix := "http://"
//if ssl == "true" || ssl == "1" {
// prefix = "https://"
//}
repo := impl.Repos.GetRegistryRepo()
update := repo.UpdateValue
update(registry.ApiRequireVersion, gf("api_require_version"))
// 更新静态服务器的地址(解偶合)
//prefix := repo.Get(registry.DomainPrefixImage)
//format.GlobalImageServer = fmt.Sprintf("%s://%s%s", protocol, prefix, domain)
//hash := crypto.Md5([]byte(strconv.Itoa(int(time.Now().Unix()))))[8:14]
//mp[variable.DEnabledSSL] = gf("ssl_enabled")
//mp[consts.DStaticPath] = gf("static_server")
//mp[variable.DImageServer] = gf("image_server")
//mp[variable.DUrlHash] = hash
//mp[variable.DRetailPortal] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_PORTAL, domain}, "")
//mp[variable.DWholesalePortal] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_WHOLESALE_PORTAL, domain}, "")
//mp[variable.DUCenter] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_MEMBER, domain}, "")
//mp[variable.DPassport] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_PASSPORT, domain}, "")
//mp[variable.DMerchant] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_MERCHANT, domain}, "")
//mp[variable.DHApi] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_HApi, domain}, "")
//
//mp[variable.DRetailMobilePortal] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_PORTAL_MOBILE, domain}, "")
//mp[variable.DWholesaleMobilePortal] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_M_WHOLESALE, domain}, "")
//mp[variable.DMobilePassport] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_M_PASSPORT, domain}, "")
//mp[variable.DMobileUCenter] = strings.Join([]string{prefix,
// variable.DOMAIN_PREFIX_M_MEMBER, domain}, "")
}