forked from ixre/go2o
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgo2o-serve.go
executable file
·77 lines (62 loc) · 1.86 KB
/
go2o-serve.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
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* Copyright 2014 @ 56x.net.
* name :
* author : jarryliu
* date : 2013-12-16 21:45
* description :
* history :
*/
package main
import (
"github.com/ixre/go2o/app"
)
var _ = `
#### #### ####### ####
# # # # # # #
# # # ##### # #
# ### # # # # #
# # # # # # #
#### #### ####### ####
Go2o is Google Go language binding domain-driven design (DDD) O2O open source implementation. Support Online Store
, Offline stores; multi-channel (businesses), multi-store, merchandise, snapshots, orders, sales, payment, distribution and other functions.
Project by a management center (including platform management center, business background, store background), online store (PC shop,
Handheld shops, micro-channel), the member center, open API in four parts.
Go2o using domain-driven design for business depth abstract, theoretical support in most sectors O2O scenarios.
Through open API, you can seamlessly integrate into legacy systems.
Email: jarrysix#gmail.com
`
// - GO2O_SERVER_HOST: 当前节点的主机头或IP,用于指定固定的服务发现IP
func main() {
app.ParseFlags()
ch := make(chan bool)
app.Run(ch, nil)
}
/*
// todo: v3 还是测试版本
func runGoMicro() {
r := consul.NewRegistry(func(options *registry.Options) {
options.Addrs = []string{
"127.0.0.1:8500",
}
})
grpc.NewServer(
server.Name("Greeter"),
server.Registry(NewRegisterV3(r)))
s := service.New(
service.Name("Greeter"),
service.Address(":1081"),
)
//service := micro.NewService(
// micro.Name("Greeter"),
// //micro.Address(":1081"),
// micro.Registry(r),
// )
//service.Init()
s.Handle(new(grpc.TestServiceImpl))
//proto.RegisterGreeterServiceHandler(service,new(grpc.TestServiceImpl))
service.Run()
}
func NewRegisterV3(r registry.Registry) registry2.Registry {
return &RegisterV3{r}
}
*/