github.com/juju/juju@v0.0.0-20240430160146-1752b71fcf00/core/database/interface.go (about) 1 // Copyright 2023 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package database 5 6 // DBGetter describes the ability to supply a TrackedDB reference for a 7 // particular database. 8 type DBGetter interface { 9 // GetDB returns a TrackedDB reference for the dqlite-backed database that 10 // contains the data for the specified namespace. 11 // A NotFound error is returned if the worker is unaware of the requested 12 // DB. 13 GetDB(namespace string) (TrackedDB, error) 14 } 15 16 const ( 17 // ControllerNS is the namespace for the controller database. 18 ControllerNS = "controller" 19 )