Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 2.07 KB

README.md

File metadata and controls

56 lines (37 loc) · 2.07 KB

JSON Fliox     Hub DB SPLASH

.NET Tests

DB - Hub support databases

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.

Examples

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

cluster

// expose info of hosted databases. cluster is required by Hub Explorer
hub.AddExtensionDB (new ClusterDB("cluster", hub));

monitor

// expose monitor stats as extension database
hub.AddExtensionDB (new MonitorDB("monitor", hub));

user_db

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