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
coreospackage
Commits
98e39881
Commit
98e39881
authored
7 years ago
by
Sandeep S. Shewalkar
Browse files
Options
Downloads
Plain Diff
Merge branch 'stagingbranch' into 'master'
Stagingbranch See merge request
!9
parents
497ad486
e411ba33
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!9
Stagingbranch
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
cacheHelper.go
+8
-8
cacheHelper.go
dalFDB.go
+28
-0
dalFDB.go
dalNoSQL.go
+1
-1
dalNoSQL.go
validationHelper.go
+1
-0
validationHelper.go
with
38 additions
and
9 deletions
cacheHelper.go
+
8
−
8
View file @
98e39881
...
...
@@ -7,15 +7,15 @@ import (
"github.com/allegro/bigcache"
)
const
(
BIGCACHEShards
=
8
BIGCACHEMaxEntrySize
=
1024
BIGCACHEVerbose
=
true
BIGCACHEHardMaxCacheSize
=
0
BIGCACHEMaxEntriesInWindow
=
1000
10
60
BIGCACHELifeWindow
=
2
BIGCACHEShards
=
8
BIGCACHEMaxEntrySize
=
1024
BIGCACHEVerbose
=
true
BIGCACHEHardMaxCacheSize
=
0
BIGCACHEMaxEntriesInWindow
=
1000
*
10
*
60
BIGCACHELifeWindow
=
2
)
var
bigcacheConfig
=
bigcache
.
Config
{
// number of shards (must be a power of 2)
// Shards: 4096,
...
...
@@ -23,7 +23,7 @@ var bigcacheConfig = bigcache.Config{
// time after which entry can be evicted
LifeWindow
:
BIGCACHELifeWindow
*
time
.
Hour
,
// rps * lifeWindow, used only in initial memory allocation
MaxEntriesInWindow
:
1000
*
10
*
60
,
MaxEntriesInWindow
:
BIGCACHEMaxEntriesInWindow
,
// MaxEntriesInWindow: 10,
// max entry size in bytes, used only in initial memory allocation
MaxEntrySize
:
BIGCACHEMaxEntrySize
,
...
...
This diff is collapsed.
Click to expand it.
dalFDB.go
0 → 100644
+
28
−
0
View file @
98e39881
package
coreos
import
(
"fmt"
"time"
)
//GetDataFromFDB gets data from FDB
func
GetDataFromFDB
(
filePath
string
)
([]
byte
,
error
)
{
data
,
err
:=
ReadFile
(
filePath
)
return
data
,
err
}
//SaveDataToFDB saves data to FDB
func
SaveDataToFDB
(
filePath
string
,
data
[]
byte
)
error
{
err
:=
WriteFile
(
filePath
,
data
)
fmt
.
Println
(
err
)
return
err
}
//DeleteFileFromFDB deletes file to FDB
func
DeleteFileFromFDB
(
filePath
string
)
error
{
newFilePath
:=
filePath
+
"_deleted_"
+
time
.
Now
()
.
String
()
err
:=
RenameFile
(
filePath
,
newFilePath
)
return
err
}
This diff is collapsed.
Click to expand it.
dalNoSQL.go
+
1
−
1
View file @
98e39881
...
...
@@ -16,7 +16,7 @@ func GetMongoConnection() *mgo.Session {
Host
:=
[]
string
{
GetConfig
(
"MONGODSN"
),
}
const
(
var
(
Username
=
""
Password
=
""
Database
=
GetConfig
(
"DBNAME"
)
...
...
This diff is collapsed.
Click to expand it.
validationHelper.go
+
1
−
0
View file @
98e39881
...
...
@@ -4,6 +4,7 @@ import (
"github.com/go-playground/locales/en"
ut
"github.com/go-playground/universal-translator"
validator
"gopkg.in/go-playground/validator.v9"
en_translations
"gopkg.in/go-playground/validator.v9/translations/en"
)
...
...
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