Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
MKCLOS
Core Development Platform
corepkgv2
Commits
bf5ba0f4
Commit
bf5ba0f4
authored
6 years ago
by
Ajit Jagtap
Browse files
Options
Downloads
Plain Diff
Merge branch 'coremongo_package_update' into 'devbranch'
Coremongo package update See merge request
!103
parents
b82221bf
8bcda582
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!104
20Aug V2 Merge Dev to Stg
,
!103
Coremongo package update
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dalmdl/coremongo/coremongo.go
+2
-2
dalmdl/coremongo/coremongo.go
grpcclientmdl/grpcclientmdl.go
+2
-2
grpcclientmdl/grpcclientmdl.go
with
4 additions
and
4 deletions
dalmdl/coremongo/coremongo.go
+
2
−
2
View file @
bf5ba0f4
...
...
@@ -63,7 +63,7 @@ func InitUsingJSON(configs []MongoHost) error {
loggermdl
.
LogError
(
bindMongoServerWithPort
(
hostDetails
.
Server
,
hostDetails
.
Port
))
clientOption
.
SetHosts
([]
string
{
bindMongoServerWithPort
(
hostDetails
.
Server
,
hostDetails
.
Port
)})
.
SetConnectTimeout
(
hostDetails
.
ConnMaxLifetime
)
.
SetMaxPoolSize
(
uint
1
6
(
hostDetails
.
MaxOpenConns
))
.
SetMaxPoolSize
(
uint6
4
(
hostDetails
.
MaxOpenConns
))
.
SetReadPreference
(
readpref
.
Primary
())
.
SetDirect
(
true
)
// important if in cluster, connect to primary only.
if
hostDetails
.
Username
!=
""
{
...
...
@@ -125,7 +125,7 @@ func InitNewSession(hostDetails MongoHost) error {
clientOption
:=
options
.
Client
()
clientOption
.
SetHosts
([]
string
{
bindMongoServerWithPort
(
hostDetails
.
Server
,
hostDetails
.
Port
)})
.
SetConnectTimeout
(
hostDetails
.
ConnMaxLifetime
)
.
SetMaxPoolSize
(
uint
1
6
(
hostDetails
.
MaxOpenConns
))
.
SetMaxPoolSize
(
uint6
4
(
hostDetails
.
MaxOpenConns
))
.
SetReadPreference
(
readpref
.
Primary
())
.
SetDirect
(
true
)
// important if in cluster, connect to primary only.
if
hostDetails
.
Username
!=
""
{
...
...
This diff is collapsed.
Click to expand it.
grpcclientmdl/grpcclientmdl.go
+
2
−
2
View file @
bf5ba0f4
...
...
@@ -27,12 +27,12 @@ func TotalCheck() (string, error) {
return
res
.
GetData
(),
nil
}
var
instances
map
[
string
]
*
grpcpool
.
Pool
var
instances
=
make
(
map
[
string
]
*
grpcpool
.
Pool
)
var
instancesList
map
[
string
]
map
[
string
]
*
grpcpool
.
Pool
// Init init
func
Init
(
grpcServerURLList
[]
string
,
grpcClients
[]
string
)
{
instances
=
make
(
map
[
string
]
*
grpcpool
.
Pool
)
//
instances = make(map[string]*grpcpool.Pool)
loggermdl
.
LogError
(
"Length of grpcServerURLList"
,
len
(
grpcServerURLList
))
for
index
:=
0
;
index
<
len
(
grpcServerURLList
);
index
++
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets