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>
12 lines
285 B
Go
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
|
|
}
|