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
71579d9f
authored
Jul 03, 2020
by
孙龙
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
up
parent
e7bb14bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
pkg/gredis/redis.go
pkg/gredis/redis.go
View file @
71579d9f
...
...
@@ -7,6 +7,26 @@ import (
"time"
)
type
IchuntRedisInterface
interface
{
get
()
set
()
}
type
IchuntRedis
struct
{
}
func
(
this
*
IchuntRedis
)
Connection
(
connection
string
,
host
string
,
passwd
string
)
(
*
redis
.
Pool
,
error
){
redisHost
:=
config
.
Get
(
host
)
.
String
()
redisPasswd
:=
config
.
Get
(
passwd
)
.
String
()
redisPoll
,
err
:=
getConn
(
redisHost
,
redisPasswd
)
if
err
!=
nil
{
return
nil
,
err
}
return
redisPoll
,
nil
}
var
writeConn
,
readConn
*
redis
.
Pool
func
Setup
()
(
err
error
)
{
...
...
@@ -139,3 +159,4 @@ func HDelete(key string, k interface{}) (bool, error) {
return
redis
.
Bool
(
conn
.
Do
(
"HDEL"
,
key
,
k
))
}
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