aboutsummaryrefslogtreecommitdiff
path: root/worker/worker.go
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-09 20:39:00 -0500
committerDrew DeVault <sir@cmpwn.com>2018-01-09 20:39:00 -0500
commit6394e386c2a88c3b376cd422a7b7ce5ae7534984 (patch)
tree2d78f622096e439cf5d91a090999f5c522796c42 /worker/worker.go
parent7d0edcc9e7ecdedb8cabafac1167581d7205596e (diff)
Initial pass on worker/UI message passing
Diffstat (limited to 'worker/worker.go')
-rw-r--r--worker/worker.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/worker/worker.go b/worker/worker.go
new file mode 100644
index 0000000..1f9f04c
--- /dev/null
+++ b/worker/worker.go
@@ -0,0 +1,18 @@
+package worker
+
+import (
+ "git.sr.ht/~sircmpwn/aerc2/worker/imap"
+ "git.sr.ht/~sircmpwn/aerc2/worker/types"
+)
+
+type Worker interface {
+ GetMessage() types.WorkerMessage
+ PostAction(types.WorkerMessage)
+ Run()
+}
+
+// Guesses the appropriate worker type based on the given source string
+func NewWorker(source string) Worker {
+ // TODO: Do this properly
+ return imap.NewIMAPWorker()
+}