From 8cb4a9d751d1497e1059fedb03964bc9e56e5c06 Mon Sep 17 00:00:00 2001 From: Kevin Kuehler Date: Thu, 10 Oct 2019 15:27:07 -0700 Subject: Start adding thread support * Add threading-enabled config option * Add DirectoryThreaded and FetchDirectoryThreaded types to control path * Add generic thread type for all backends to use Signed-off-by: Kevin Kuehler --- worker/types/messages.go | 10 ++++++++++ worker/types/thread.go | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 worker/types/thread.go (limited to 'worker/types') diff --git a/worker/types/messages.go b/worker/types/messages.go index 3539139..0b9dc6e 100644 --- a/worker/types/messages.go +++ b/worker/types/messages.go @@ -81,6 +81,11 @@ type FetchDirectoryContents struct { SortCriteria []*SortCriterion } +type FetchDirectoryThreaded struct { + Message + SortCriteria []*SortCriterion +} + type SearchDirectory struct { Message Argv []string @@ -152,6 +157,11 @@ type DirectoryContents struct { Uids []uint32 } +type DirectoryThreaded struct { + Message + Threads []*Thread +} + type SearchResults struct { Message Uids []uint32 diff --git a/worker/types/thread.go b/worker/types/thread.go new file mode 100644 index 0000000..265438f --- /dev/null +++ b/worker/types/thread.go @@ -0,0 +1,6 @@ +package types + +type Thread struct { + Uid uint32 + Children []*Thread +} -- cgit v1.2.3