Add worker tagging (#862)

This allows workers to have tags assigned to them, which can then be filtered to control which targets they are allowed to serve.
This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-01-21 16:27:20 -05:00
1 parent 595a86508e
commit 717a3b52ee
54 files changed
+2150 -666

No files matched your search

+7
View File
@@ -97,4 +97,11 @@ func Test_GetOpts(t *testing.T) {
testOpts.withHostSets = []string{"alice", "bob"}
assert.Equal(opts, testOpts)
})
t.Run("WithWorkerFilter", func(t *testing.T) {
assert := assert.New(t)
opts := getOpts(WithWorkerFilter(`"/foo" == "bar"`))
testOpts := getDefaultOptions()
testOpts.withWorkerFilter = `"/foo" == "bar"`
assert.Equal(opts, testOpts)
})
}