diff options
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 00000000..1f9f04cf --- /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() +} |