aboutsummaryrefslogtreecommitdiffstats
path: root/worker/worker.go
Commit message (Collapse)AuthorAgeFilesLines
* aerc: use single event loopTim Culverhouse2022-10-071-2/+2
| | | | | | | | | Combine tcell events with WorkerMessages to better synchronize state with IO and UI. Remove Tick loop for rendering. Use events to trigger renders. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
* logging: use level-based logger functionsRobin Jarry2022-07-231-5/+2
| | | | | | | | | | | | Do not pass logger objects around anymore. Shuffle some messages to make them consistent with the new logging API. Avoid using %v when a more specific verb exists for the argument types. The loggers are completely disabled (i.e. Sprintf is not even called) by default. They are only enabled when redirecting stdout to a file. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
* go.mod: change base git urlRobin Jarry2021-11-051-2/+2
| | | | | | | I'm not sure what are the implications but it seems required. Link: https://github.com/golang/go/issues/20883 Signed-off-by: Robin Jarry <robin@jarry.cc>
* Register worker in init.Reto Brunner2019-07-191-17/+7
| | | | | This allows backends which can't always be compiled due to missing dependencies (say libnotmuch) to be compiled conditionally with buildflags.
* maildir: Watch for new messagesBen Burwell2019-07-171-1/+5
| | | | | | | | When a directory is opened, start watching its "new" subdirectory for incoming messages using the fsnotify library. When creation events are detected, run the Unseen routine to move the message from new to cur and add new UIDs to the store, updating the UI's list of directory contents as we go.
* Add maildir backend workerBen Burwell2019-07-121-0/+3
| | | | | | | | | | | | | Add the initial implementation of a backend for Maildir accounts. Much of the functionality required is implemented in the go-message and go-maildir libraries, so we use them as much as possible. The maildir worker hooks into a new maildir:// URL scheme in the accounts.conf file which points to a container of several maildir directories. From there, the OpenDirectory, FetchDirectoryContents, etc messages work on subdirectories. This is implemented as a Container struct which handles mapping between the symbolic email folder names and UIDs to the concrete directories and file names.
* Load IMAP worker for imap+insecureDrew DeVault2019-05-201-1/+7
|
* s/aerc2/aerc/gDrew DeVault2019-05-171-2/+2
|
* worker/types: fix Worker.Callbacks race conditionSimon Ser2019-04-271-6/+1
| | | | | | | | | | | | | Worker.Process* functions were called in different goroutines than Worker.Post*. Protect the map with a mutex. Also make the map unexported to prevent external unprotected accesses. Worker.Process* functions used to delete items from the map. However they didn't delete the element they retrieved: callbacks[msg.InResponseTo()] was read while callbacks[msg] was deleted. I'm not sure I understand why. I tried to delete the element that was accessed - but this broke everything (UI froze at "Connecting..."). I don't believe any elements were actually removed from the map, so the new code just doesn't remove anything.
* Apply gofmtDrew DeVault2018-06-121-1/+2
|
* fallthrough in worker selectionMarkus Ongyerth2018-06-121-1/+1
|
* Reduce boilerplate in worker/UIDrew DeVault2018-02-011-9/+11
|
* Improve loggingDrew DeVault2018-01-311-2/+3
|
* Move worker into account tabDrew DeVault2018-01-111-1/+1
|
* Misc idiomatic fixesemersion2018-01-101-5/+2
|
* Parse account configurationDrew DeVault2018-01-091-3/+17
|
* Initial pass on worker/UI message passingDrew DeVault2018-01-091-0/+18