garm/database/watcher/test_export.go
Gabriel Adrian Samfira 8d57fc8fa2 Add rudimentary database watcher
Adds a simple database watcher. At this point it's just one process, but
the plan is to allow different implementations that inform the local running
workers of changes that have occured on entities of interest in the database.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-06-14 19:47:12 +00:00

12 lines
285 B
Go

//go:build testing
// +build testing
package watcher
import "github.com/cloudbase/garm/database/common"
// SetWatcher sets the watcher to be used by the database package.
// This function is intended for use in tests only.
func SetWatcher(w common.Watcher) {
databaseWatcher = w
}