MCPcopy Create free account
hub / github.com/cloudbase/garm / composeWorkerWatcherFilters

Function composeWorkerWatcherFilters

workers/entity/util.go:55–67  ·  view source on GitHub ↗
(entity params.ForgeEntity)

Source from the content-addressed store, hash-verified

53}
54
55func composeWorkerWatcherFilters(entity params.ForgeEntity) dbCommon.PayloadFilterFunc {
56 return watcher.WithAny(
57 watcher.WithAll(
58 watcher.WithEntityFilter(entity),
59 watcher.WithOperationTypeFilter(dbCommon.UpdateOperation),
60 ),
61 // Watch for credentials updates.
62 watcher.WithAll(
63 watcher.WithForgeCredentialsFilter(entity.Credentials),
64 watcher.WithOperationTypeFilter(dbCommon.UpdateOperation),
65 ),
66 )
67}
68
69func poolIDFromLabels(runner params.RunnerReference) string {
70 for _, lbl := range runner.Labels {

Callers 2

StartMethod · 0.85

Calls 5

WithAnyFunction · 0.92
WithAllFunction · 0.92
WithEntityFilterFunction · 0.92
WithOperationTypeFilterFunction · 0.92

Tested by

no test coverage detected