summaryrefslogtreecommitdiff
path: root/spooler.go
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2017-08-07 09:46:27 +0100
committerKatolaZ <katolaz@freaknet.org>2017-08-07 09:46:27 +0100
commitd3105e671a19fec1060652531ce783227fb9fab6 (patch)
treeeec4fd66285ef2d65f4c52a55c07780906fdea10 /spooler.go
parent587c8bf41568c9624f9874bb4e2549227c1e3b63 (diff)
type renamed to avoid the SCORSH prefix
Diffstat (limited to 'spooler.go')
-rw-r--r--spooler.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/spooler.go b/spooler.go
index e5fe4be..3629bef 100644
--- a/spooler.go
+++ b/spooler.go
@@ -11,7 +11,7 @@ import (
)
// parse a request file and return a SCORSHmessage
-func parseRequest(fname string, msg *SCORSHmsg) error {
+func parseRequest(fname string, msg *spoolMsg) error {
debug.log("[parseRequest] message at start: %s\n", msg)
@@ -33,7 +33,7 @@ func parseRequest(fname string, msg *SCORSHmsg) error {
return nil
}
-func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) {
+func spooler(watcher *fsnotify.Watcher, master chan spoolMsg) {
log.Println("Spooler started correctly")
@@ -44,7 +44,7 @@ func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) {
// "Write" event, which should happen only when the file is
// created
if event.Op == fsnotify.Write {
- var msg SCORSHmsg
+ var msg spoolMsg
debug.log("[spooler] new file %s detected\n", event.Name)
err := parseRequest(event.Name, &msg)
if err != nil {
@@ -71,7 +71,7 @@ func spooler(watcher *fsnotify.Watcher, master chan SCORSHmsg) {
}
}
-func startSpooler(master *SCORSHmaster) error {
+func startSpooler(master *master) error {
watcher, err := fsnotify.NewWatcher()