diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-01-09 20:39:00 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-01-09 20:39:00 -0500 |
commit | 6394e386c2a88c3b376cd422a7b7ce5ae7534984 (patch) | |
tree | 2d78f622096e439cf5d91a090999f5c522796c42 /worker/worker.go | |
parent | 7d0edcc9e7ecdedb8cabafac1167581d7205596e (diff) | |
download | aerc-6394e386c2a88c3b376cd422a7b7ce5ae7534984.tar.gz |
Initial pass on worker/UI message passing
Diffstat (limited to 'worker/worker.go')
-rw-r--r-- | worker/worker.go | 18 |
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() +} |