namespace Friflo.Json.Fliox.Hub.DB
DB API reference at fliox-docs
This namespace provide a set of administrative databases when using a FlioxHub
as a server - a HttpHost
.
Using these databases in a FlioxHub
is optional.
If adding these databases to a FlioxHub
they are available in the Hub Explorer
-
cluster
- ClusterStore - Expose information about hosted databases their containers, commands and schema. -
monitor
- MonitorStore - Expose server Monitoring to get statistics about requests and tasks executed by users and clients. -
user_db
- UserStore - Access and change user permissions and roles required for authorization.
To utilize these databases add them as extension databases to a FlioxHub
.
Prerequisite
var hub = new FlioxHub(database); // Create a FlioxHub with given default database
// expose info of hosted databases. cluster is required by Hub Explorer
hub.AddExtensionDB (new ClusterDB("cluster", hub));
// expose monitor stats as extension database
hub.AddExtensionDB (new MonitorDB("monitor", hub));
var userDB = new FileDatabase("user_db", c.userDbPath, new UserDBHandler(), null, false);
hub.Authenticator = new UserAuthenticator(userDB)
.SubscribeUserDbChanges(hub.EventDispatcher); // optional - apply user_db changes instantaneously
hub.AddExtensionDB(userDB); // expose user_db as extension database