Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7b9e605b
authored
Jun 29, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/mushishixian/search_server
# Conflicts: # bat/course.bat
parents
956e629b
a20a53f6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
7 deletions
bat/course.bat
boot/app.go
cmd/course_http_server.go
doc/bom_service.md
go.mod
readme.md
bat/course.bat
View file @
7b9e605b
set MICRO_REGISTRY=etcd
set MICRO_REGISTRY=etcd
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
set MICRO_REGISTRY_ADDRESS=192.168.2.232:2379
go run ../cmd/course_server.go --server_address :9091
go run ../cmd/course_server.go --server_address :9092
\ No newline at end of file
\ No newline at end of file
boot/app.go
View file @
7b9e605b
...
@@ -4,15 +4,16 @@ import (
...
@@ -4,15 +4,16 @@ import (
"search_server/pkg/config"
"search_server/pkg/config"
"search_server/pkg/gredis"
"search_server/pkg/gredis"
"search_server/pkg/logger"
"search_server/pkg/logger"
"search_server/pkg/mysql"
)
)
func
Boot
(
configPath
string
)
(
err
error
)
{
func
Boot
(
configPath
string
)
(
err
error
)
{
if
err
=
config
.
SetUp
(
configPath
);
err
!=
nil
{
if
err
=
config
.
SetUp
(
configPath
);
err
!=
nil
{
panic
(
err
)
panic
(
err
)
}
}
//
if err = mysql.Setup(); err != nil {
if
err
=
mysql
.
Setup
();
err
!=
nil
{
//
return
return
//
}
}
if
err
=
gredis
.
Setup
();
err
!=
nil
{
if
err
=
gredis
.
Setup
();
err
!=
nil
{
return
return
}
}
...
...
cmd/course_http_server.go
View file @
7b9e605b
...
@@ -12,8 +12,9 @@ import (
...
@@ -12,8 +12,9 @@ import (
)
)
func
main
()
{
func
main
()
{
var
path
string
var
path
string
flag
.
StringVar
(
&
path
,
"config"
,
"
../
conf/config.ini"
,
"配置文件"
)
flag
.
StringVar
(
&
path
,
"config"
,
"conf/config.ini"
,
"配置文件"
)
flag
.
Parse
()
flag
.
Parse
()
if
err
:=
boot
.
Boot
(
path
);
err
!=
nil
{
if
err
:=
boot
.
Boot
(
path
);
err
!=
nil
{
log
.
Println
(
err
)
log
.
Println
(
err
)
...
...
doc/bom_service.md
View file @
7b9e605b
##bom_service 实现了bom的搜索
##bom_service 实现了bom的搜索
,接口如下
go.mod
View file @
7b9e605b
...
@@ -19,6 +19,7 @@ require (
...
@@ -19,6 +19,7 @@ require (
github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1 // indirect
github.com/joncalhoun/qson v0.0.0-20170526102502-8a9cab3a62b1 // indirect
github.com/mholt/certmagic v0.9.3 // indirect
github.com/mholt/certmagic v0.9.3 // indirect
github.com/micro/go-micro/v2 v2.9.0
github.com/micro/go-micro/v2 v2.9.0
github.com/micro/micro/v2 v2.9.1 // indirect
github.com/prometheus/client_golang v1.5.1 // indirect
github.com/prometheus/client_golang v1.5.1 // indirect
github.com/prometheus/common v0.10.0
github.com/prometheus/common v0.10.0
github.com/prometheus/procfs v0.0.11 // indirect
github.com/prometheus/procfs v0.0.11 // indirect
...
...
readme.md
View file @
7b9e605b
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
├── protos //原始的protos文件
├── protos //原始的protos文件
├── service //业务逻辑操作所在目录
├── service //业务逻辑操作所在目录
### 已经封装的模块以及用法
### 已经封装的模块以及用法
#### 1.配置读取
#### 1.配置读取
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment