mirror of
				https://github.com/gravitl/netmaker.git
				synced 2025-10-30 03:41:51 +08:00 
			
		
		
		
	added mq and database connected funcs and endpoint
This commit is contained in:
		| @@ -25,6 +25,7 @@ var SQLITE_FUNCTIONS = map[string]interface{}{ | ||||
| 	DELETE_ALL:   sqliteDeleteAllRecords, | ||||
| 	FETCH_ALL:    sqliteFetchRecords, | ||||
| 	CLOSE_DB:     sqliteCloseDB, | ||||
| 	isConnected:  sqliteConnected, | ||||
| } | ||||
|  | ||||
| func initSqliteDB() error { | ||||
| @@ -135,3 +136,8 @@ func sqliteFetchRecords(tableName string) (map[string]string, error) { | ||||
| func sqliteCloseDB() { | ||||
| 	SqliteDB.Close() | ||||
| } | ||||
|  | ||||
| func sqliteConnected() bool { | ||||
| 	stats := SqliteDB.Stats() | ||||
| 	return stats.OpenConnections > 0 | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 0xdcarns
					0xdcarns