Update cmd/futriis/main.go
This commit is contained in:
1 parent
8800560969
commit
1feb3348a4
1 file changed
+23
-2
+23
-2
@@ -25,6 +25,12 @@
|
|||||||
* - Интеграция с Prometheus: /metrics endpoint
|
* - Интеграция с Prometheus: /metrics endpoint
|
||||||
* - ДОБАВЛЕНО: поддержка TLS на HTTP API (вариант A — TLS внутри futriiX).
|
* - ДОБАВЛЕНО: поддержка TLS на HTTP API (вариант A — TLS внутри futriiX).
|
||||||
* Теперь используется api.NewHTTPServerWithTLS(..., &cfg.Security).
|
* Теперь используется api.NewHTTPServerWithTLS(..., &cfg.Security).
|
||||||
|
* - ИСПРАВЛЕНО (UI): убраны лишние пустые строки перед баннером, чтобы
|
||||||
|
* строка "futriis 3i²(by 22.09.2026)" шла сразу после сообщения ACL
|
||||||
|
* о созданном admin-пользователе.
|
||||||
|
* - ИСПРАВЛЕНО (UI): текст баннера окрашивается в точный #00bfff
|
||||||
|
* (Deep Sky Blue) через utils.PrintlnDeepSkyBlueReset, чтобы совпадать
|
||||||
|
* с цветом надписи "futriis 3i²(by 22.09.2026)".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package main
|
package main
|
||||||
@@ -284,6 +290,10 @@ func main() {
|
|||||||
logger.Info(" - Automatic data persistence - ENABLED")
|
logger.Info(" - Automatic data persistence - ENABLED")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ИСПРАВЛЕНО (UI): убраны лишние пустые строки перед баннером.
|
||||||
|
// Внутри displayBanner уже есть utils.Println("") первой строкой,
|
||||||
|
// чтобы отделить баннер от ACL-сообщения. Строка "futriis 3i²(by
|
||||||
|
// 22.09.2026)" идёт сразу после сообщения ACL.
|
||||||
displayBanner(cfg.Cluster.Name, httpPort, raftCoordinator, cfg.Saga.Enabled, cfg.Metrics.Enabled)
|
displayBanner(cfg.Cluster.Name, httpPort, raftCoordinator, cfg.Saga.Enabled, cfg.Metrics.Enabled)
|
||||||
|
|
||||||
replInstance, err := repl.NewRepl(store, raftCoordinator, logger, cfg, aclManager, pluginManager)
|
replInstance, err := repl.NewRepl(store, raftCoordinator, logger, cfg, aclManager, pluginManager)
|
||||||
@@ -574,10 +584,19 @@ func isPortListening(port int) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// displayBanner выводит стартовый баннер.
|
||||||
|
//
|
||||||
|
// ИСПРАВЛЕНО (UI): текст баннера окрашивается точным цветом
|
||||||
|
// #00bfff (Deep Sky Blue) через utils.PrintlnDeepSkyBlueReset, чтобы
|
||||||
|
// совпадать с цветом надписи "futriis 3i²(by 22.09.2026)".
|
||||||
|
//
|
||||||
|
// Внутри уже есть utils.Println("") первой строкой, чтобы отделить
|
||||||
|
// баннер от ACL-сообщения. Дополнительные пустые строки в main() не
|
||||||
|
// добавляются (см. комментарий перед вызовом displayBanner).
|
||||||
func displayBanner(clusterName string, httpPort int, coordinator *cluster.RaftCoordinator, sagaEnabled, metricsEnabled bool) {
|
func displayBanner(clusterName string, httpPort int, coordinator *cluster.RaftCoordinator, sagaEnabled, metricsEnabled bool) {
|
||||||
utils.Println("")
|
utils.Println("")
|
||||||
bannerLines := []string{
|
bannerLines := []string{
|
||||||
" futriis 3i²(by 02.04.2026) ",
|
" futriis 3i²(by 22.09.2026) ",
|
||||||
" Distributed Document-Store in-memory database with support lua plugins ",
|
" Distributed Document-Store in-memory database with support lua plugins ",
|
||||||
" Cluster status: enable (Raft consensus)",
|
" Cluster status: enable (Raft consensus)",
|
||||||
" Cluster features: Pipeline Replication, Batch Commit, Dynamic Resharding",
|
" Cluster features: Pipeline Replication, Batch Commit, Dynamic Resharding",
|
||||||
@@ -624,7 +643,9 @@ func displayBanner(clusterName string, httpPort int, coordinator *cluster.RaftCo
|
|||||||
}...)
|
}...)
|
||||||
|
|
||||||
for _, line := range bannerLines {
|
for _, line := range bannerLines {
|
||||||
utils.PrintInfo(line)
|
// ИСПРАВЛЕНО: используем точный цвет #00bfff (Deep Sky Blue),
|
||||||
|
// совпадающий с цветом заголовка баннера.
|
||||||
|
utils.PrintlnDeepSkyBlueReset(line)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user