Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rym-util
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhengqiuyun
rym-util
Commits
3c8c5de2
Commit
3c8c5de2
authored
Aug 10, 2022
by
zhengqiuyun86
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化
parent
f4ab4b6a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
6 deletions
+3
-6
conf.go
conf/conf.go
+0
-2
EsClient.go
es/EsClient.go
+1
-2
MysqlClient.go
mysqlrym/MysqlClient.go
+1
-1
RedisClient.go
redis/RedisClient.go
+1
-1
No files found.
conf/conf.go
View file @
3c8c5de2
...
@@ -44,9 +44,7 @@ func BaseConfig(conf Config) {
...
@@ -44,9 +44,7 @@ func BaseConfig(conf Config) {
LogShowSql
=
conf
.
LogShowSql
LogShowSql
=
conf
.
LogShowSql
Es
=
conf
.
Elasticsearch
Es
=
conf
.
Elasticsearch
Redis
=
conf
.
Redis
Redis
=
conf
.
Redis
MySql
=
conf
.
Mysql
MySql
=
conf
.
Mysql
}
}
...
...
es/EsClient.go
View file @
3c8c5de2
...
@@ -16,8 +16,7 @@ func TestLog() {
...
@@ -16,8 +16,7 @@ func TestLog() {
var
Client
*
elastic
.
Client
var
Client
*
elastic
.
Client
//初始化
func
Init
()
{
func
init
()
{
host
:=
fmt
.
Sprintf
(
"http://%s:%d"
,
conf
.
Es
.
ServerHost
,
conf
.
Es
.
ServerPort
)
host
:=
fmt
.
Sprintf
(
"http://%s:%d"
,
conf
.
Es
.
ServerHost
,
conf
.
Es
.
ServerPort
)
var
err
error
var
err
error
errorLog
:=
_log
.
New
(
os
.
Stdout
,
"APP"
,
_log
.
LstdFlags
)
errorLog
:=
_log
.
New
(
os
.
Stdout
,
"APP"
,
_log
.
LstdFlags
)
...
...
mysqlrym/MysqlClient.go
View file @
3c8c5de2
...
@@ -96,7 +96,7 @@ func commitTx(gid uint64, dbMap *sync.Map) {
...
@@ -96,7 +96,7 @@ func commitTx(gid uint64, dbMap *sync.Map) {
}
}
}
}
func
i
nit
()
{
func
I
nit
()
{
newLogger
:=
logger
.
New
(
newLogger
:=
logger
.
New
(
_log
.
New
(
os
.
Stdout
,
""
,
_log
.
Lmicroseconds
),
// io writer(日志输出的目标,前缀和日志包含的内容——译者注)
_log
.
New
(
os
.
Stdout
,
""
,
_log
.
Lmicroseconds
),
// io writer(日志输出的目标,前缀和日志包含的内容——译者注)
logger
.
Config
{
logger
.
Config
{
...
...
redis/RedisClient.go
View file @
3c8c5de2
...
@@ -15,7 +15,7 @@ func TestLog() {
...
@@ -15,7 +15,7 @@ func TestLog() {
var
redisClient
*
redis
.
Client
var
redisClient
*
redis
.
Client
func
i
nit
()
{
func
I
nit
()
{
redisClient
=
redis
.
NewClient
(
&
redis
.
Options
{
redisClient
=
redis
.
NewClient
(
&
redis
.
Options
{
Addr
:
fmt
.
Sprintf
(
"%s:%d"
,
conf
.
Redis
.
RedisHost
,
conf
.
Redis
.
RedisPort
),
Addr
:
fmt
.
Sprintf
(
"%s:%d"
,
conf
.
Redis
.
RedisHost
,
conf
.
Redis
.
RedisPort
),
Password
:
conf
.
Redis
.
RedisPwd
,
Password
:
conf
.
Redis
.
RedisPwd
,
...
...
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