summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Langesten <daniel.langest@gmail.com>2015-03-18 03:39:46 +0100
committerDaniel Langesten <daniel.langest@gmail.com>2015-03-18 03:39:46 +0100
commit781f1ed0ff08731c9f7c5e88bc07b74faa443050 (patch)
treeeb432fa0755a474a10e1d0839f02413ad5a8413f
parentfee0e9b89dc6e1b417a88f955029cacf47d86934 (diff)
removed volume since it can be configured in pmacct
-rw-r--r--cleaner_test.go12
-rw-r--r--config.go13
-rw-r--r--config.json19
3 files changed, 4 insertions, 40 deletions
diff --git a/cleaner_test.go b/cleaner_test.go
index d1eb870..b4028a3 100644
--- a/cleaner_test.go
+++ b/cleaner_test.go
@@ -33,18 +33,6 @@ func TestDataFetching(t *testing.T) {
func TestCleaning(t *testing.T) {
conf := Config{
- Volumes: []VolumeInfo{
- VolumeInfo{
- Size: "small",
- Lower: 0,
- Upper: 100,
- },
- VolumeInfo{
- Size: "medium",
- Lower: 100,
- Upper: 0,
- },
- },
Interval: "10min",
Epsilon: 0,
}
diff --git a/config.go b/config.go
index 31a98d2..fd80d87 100644
--- a/config.go
+++ b/config.go
@@ -7,16 +7,9 @@ import (
)
type Config struct {
- Volumes []VolumeInfo `json:volumes`
- Limit int `json:limit`
- Interval string `json:interval`
- Epsilon float64 `json:epsilon`
-}
-
-type VolumeInfo struct {
- Size string `json:size`
- Lower int `json:lower`
- Upper int `json:upper`
+ Limit int `json:limit`
+ Interval string `json:interval`
+ Epsilon float64 `json:epsilon`
}
func readConfig() (conf Config, err error) {
diff --git a/config.json b/config.json
index 2742756..ebb9f81 100644
--- a/config.json
+++ b/config.json
@@ -6,22 +6,5 @@
"limit": 100,
"comment Epsilon": "Epsilon is the epsilon value for differential privacy. epsilon < 1 high privacy, 10 < epsilon low privacy. If epsilon is set to 0, differential privacy will not be used.",
- "epsilon": 0,
-
- "comment Volumes": "The volumes that a packet size can fall into. size is the label given to the volume. The interval of the volumes is [lower,upper).",
- "volumes": [
- {
- "size": "small",
- "upper": 100
- },
- {
- "size": "medium",
- "lower": 100,
- "upper": 200
- },
- {
- "size": "large",
- "lower": 200
- }
- ]
+ "epsilon": 0
}