Browse Source

fix: Minor restructuring

Matthias Ladkau 4 years ago
parent
commit
b91039520f
6 changed files with 18 additions and 16 deletions
  1. 2 2
      Dockerfile
  2. 1 1
      README.md
  3. 1 1
      go.mod
  4. 2 0
      go.sum
  5. 10 10
      integration/rambazamba/eventsource.go
  6. 2 2
      integration/rambazamba/eventsource_test.go

+ 2 - 2
Dockerfile

@@ -41,7 +41,7 @@ ENTRYPOINT ["../eliasdb"]
 #
 # docker run --rm --user $(id -u):$(id -g) -v $PWD:/data -p 9090:9090 krotik/eliasdb server
 
-# To run the console as the current user, use the eliasdb.config.json in 
-# the local directory
+# To run the console as the current user and use the eliasdb.config.json in 
+# the local directory run:
 
 # docker run --rm --network="host" -it -v $PWD:/data --user $(id -u):$(id -g) -v $PWD:/data krotik/eliasdb console

+ 1 - 1
README.md

@@ -26,7 +26,7 @@ Features
 
 Getting Started (standalone application)
 ----------------------------------------
-You can download a precompiled package for Windows (win64) or Linux (amd64) [here](https://void.devt.de/pub/eliasdb).
+You can download a pre-compiled package for Windows (win64) or Linux (amd64) [here](https://void.devt.de/pub/eliasdb).
 
 Extract it and execute the executable with:
 ```

+ 1 - 1
go.mod

@@ -3,6 +3,6 @@ module devt.de/krotik/eliasdb
 go 1.12
 
 require (
-	devt.de/krotik/common v1.0.0
+	devt.de/krotik/common v1.1.0
 	github.com/gorilla/websocket v1.4.1
 )

+ 2 - 0
go.sum

@@ -1,4 +1,6 @@
 devt.de/krotik/common v1.0.0 h1:nMmFFkjqb8C/oFVfsEi39qnCUbu3J1FXg+FZn5gSOQU=
 devt.de/krotik/common v1.0.0/go.mod h1:X4nsS85DAxyHkwSg/Tc6+XC2zfmGeaVz+37F61+eSaI=
+devt.de/krotik/common v1.1.0 h1:8xNZ2CwGWon6PqpWHwPhYMnkEOIiIPwdCgGoJCMyj6o=
+devt.de/krotik/common v1.1.0/go.mod h1:X4nsS85DAxyHkwSg/Tc6+XC2zfmGeaVz+37F61+eSaI=
 github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM=
 github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=

+ 10 - 10
integration/rambazamba/eventsource.go

@@ -9,16 +9,16 @@
  */
 
 /*
-Package rambazamba contains an eventsource for Rambazamba which forwards
-internal EliasDB events to Rambazamba engines.
+Package brawler contains an eventsource for Brawler which forwards
+internal EliasDB events to Brawler engines.
 */
-package rambazamba
+package brawler
 
 import (
 	"fmt"
 	"io"
 
-	"devt.de/krotik/common/defs/rambazamba"
+	"devt.de/krotik/common/defs/brawler"
 	"devt.de/krotik/eliasdb/graph"
 	"devt.de/krotik/eliasdb/graph/data"
 )
@@ -26,12 +26,12 @@ import (
 /*
 AddEventPublisher adds an EventPublisher to a given Manager using an EventBridge.
 */
-func AddEventPublisher(gm *graph.Manager, publisher rambazamba.EventPublisher, errOut io.Writer) {
+func AddEventPublisher(gm *graph.Manager, publisher brawler.EventPublisher, errOut io.Writer) {
 	gm.SetGraphRule(&EventBridge{publisher, errOut})
 }
 
 /*
-EventMapping is a mapping between EliasDB event types to Rambazamba event kinds.
+EventMapping is a mapping between EliasDB event types to Brawler event kinds.
 */
 var EventMapping = map[int]string{
 
@@ -78,15 +78,15 @@ var EventMapping = map[int]string{
 	graph.EventEdgeDeleted: "db.edge.deleted",
 }
 
-// Event bridge between EliasDB and Rambazamba
+// Event bridge between EliasDB and Brawler
 // ===========================================
 
 /*
 EventBridge is a rule for a graph manager to forward all graph events to
-Rambazamba.
+Brawler.
 */
 type EventBridge struct {
-	publisher rambazamba.EventPublisher
+	publisher brawler.EventPublisher
 	errOut    io.Writer
 }
 
@@ -94,7 +94,7 @@ type EventBridge struct {
 Name returns the name of the rule.
 */
 func (r *EventBridge) Name() string {
-	return "rambazamba.eventbridge"
+	return "brawler.eventbridge"
 }
 
 /*

+ 2 - 2
integration/rambazamba/eventsource_test.go

@@ -8,7 +8,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-package rambazamba
+package brawler
 
 import (
 	"bytes"
@@ -43,7 +43,7 @@ func TestEventSource(t *testing.T) {
 
 	AddEventPublisher(gm, ep, &log)
 
-	if res := fmt.Sprint(gm.GraphRules()); res != "[rambazamba.eventbridge system.deletenodeedges system.updatenodestats]" {
+	if res := fmt.Sprint(gm.GraphRules()); res != "[brawler.eventbridge system.deletenodeedges system.updatenodestats]" {
 		t.Error("Unexpected result:", res)
 		return
 	}