|
|
@@ -34,7 +34,7 @@ import (
|
|
|
|
|
|
// GetKernelCtx -- возвращает контекст ядра.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func GetKernelCtx() kspec.IKernelCtx {
|
|
|
ctx := kctx.GetKernelCtx()
|
|
|
return ctx
|
|
|
@@ -57,7 +57,7 @@ func WrapErr[T any](res mL0.IResult[T], err defs.IErr) mL0.IResult[T] {
|
|
|
|
|
|
// GetKernelStoreKv -- возвращает быстрое key-value хранилище ядра.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func GetKernelStoreKv() store_spec.IKernelStoreKv {
|
|
|
store := kstore_kv.GetKernelStore()
|
|
|
return store
|
|
|
@@ -65,7 +65,7 @@ func GetKernelStoreKv() store_spec.IKernelStoreKv {
|
|
|
|
|
|
// GetKernelServerHttp -- возвращает веб-сервер ядра.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func GetKernelServerHttp() kspec.IKernelServerHttp {
|
|
|
kernServHttp := kserv_http.GetKernelServHttp()
|
|
|
return kernServHttp
|
|
|
@@ -75,7 +75,7 @@ type ISafeBool = core_spec.ISafeBool
|
|
|
|
|
|
// NewSafeBool -- возвращает новый потокобезопасный булевый признак.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewSafeBool(val bool) ISafeBool {
|
|
|
sb := mL1.NewSafeBool(val)
|
|
|
return sb
|
|
|
@@ -84,14 +84,14 @@ func NewSafeBool(val bool) ISafeBool {
|
|
|
// GetKernelBusLocal -- возвращает локальную шину данных.
|
|
|
func GetKernelBusLocal() bus_spec.IKernelBus {
|
|
|
kCtx := kctx.GetKernelCtx()
|
|
|
- kCtx.Set(defs.Str("monolitName"), "unknown monolit", defs.Str("GetKernelBusLocal()"))
|
|
|
+ kCtx.Set(defs.Txt("monolitName"), "unknown monolit", defs.Txt("GetKernelBusLocal()"))
|
|
|
lBus := kbus_local.GetKernelBusLocal()
|
|
|
return lBus
|
|
|
}
|
|
|
|
|
|
// GetKernelBusHttp -- возвращает HTTP шину данных.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func GetKernelBusHttp() bus_spec.IKernelBus {
|
|
|
bus := kbus_http.GetKernelBusHttp()
|
|
|
return bus
|
|
|
@@ -99,7 +99,7 @@ func GetKernelBusHttp() bus_spec.IKernelBus {
|
|
|
|
|
|
// SleepMs -- спит миллисекунду.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func SleepMs() {
|
|
|
time.Sleep(time.Millisecond * 1)
|
|
|
}
|
|
|
@@ -107,10 +107,10 @@ func SleepMs() {
|
|
|
// GetMonolitLocal -- возвращает монолит с локальной шиной.
|
|
|
func GetMonolitLocal(name mod_ent.AModuleName) mod_spec.IKernelMonolit {
|
|
|
kCtx := kctx.GetKernelCtx()
|
|
|
- kCtx.Set(defs.Str("isLocal"), true, defs.Str("bus type"))
|
|
|
+ kCtx.Set(defs.Txt("isLocal"), true, defs.Txt("bus type"))
|
|
|
for {
|
|
|
time.Sleep(time.Millisecond * 1)
|
|
|
- optIsLocal := kCtx.Get(defs.Str("isLocal"))
|
|
|
+ optIsLocal := kCtx.Get(defs.Txt("isLocal"))
|
|
|
if optIsLocal.IsSome() {
|
|
|
break
|
|
|
}
|
|
|
@@ -124,10 +124,10 @@ func GetMonolitLocal(name mod_ent.AModuleName) mod_spec.IKernelMonolit {
|
|
|
func GetMonolitHttp(name mod_ent.AModuleName) mod_spec.IKernelMonolit {
|
|
|
kCtx := kctx.GetKernelCtx()
|
|
|
_ = kbus_http.GetKernelBusHttp()
|
|
|
- kCtx.Set(defs.Str("isLocal"), false, defs.Str("bus type"))
|
|
|
+ kCtx.Set(defs.Txt("isLocal"), false, defs.Txt("bus type"))
|
|
|
for {
|
|
|
time.Sleep(time.Millisecond * 1)
|
|
|
- optIsLocal := kCtx.Get(defs.Str("isLocal"))
|
|
|
+ optIsLocal := kCtx.Get(defs.Txt("isLocal"))
|
|
|
if optIsLocal.IsSome() {
|
|
|
break
|
|
|
}
|
|
|
@@ -138,7 +138,7 @@ func GetMonolitHttp(name mod_ent.AModuleName) mod_spec.IKernelMonolit {
|
|
|
|
|
|
// NewKernelModule -- возвращает новый модуль на ядре.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewKernelModule(name module_name.IModuleNameFix) mod_spec.IKernelModule {
|
|
|
resMod := kmodule.NewKernelModule(name)
|
|
|
return resMod
|
|
|
@@ -146,7 +146,7 @@ func NewKernelModule(name module_name.IModuleNameFix) mod_spec.IKernelModule {
|
|
|
|
|
|
// NewClientBusLocal -- возвращает клиент для работы с локальной шиной.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewClientBusLocal() bus_spec.IBusClient {
|
|
|
lClient := client_bus_local.NewClientBusLocal()
|
|
|
return lClient
|
|
|
@@ -154,15 +154,15 @@ func NewClientBusLocal() bus_spec.IBusClient {
|
|
|
|
|
|
// NewClientBusHttp -- возвращает клиент для работы с шиной поверх HTTP.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
-func NewClientBusHttp(url defs.AStr) bus_spec.IBusClient {
|
|
|
+
|
|
|
+func NewClientBusHttp(url defs.ATxt) bus_spec.IBusClient {
|
|
|
client := client_bus_http.NewClientBusHttp(url.String())
|
|
|
return client
|
|
|
}
|
|
|
|
|
|
// GetModuleServHttp -- возвращает модуль для IKernelServHttp.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func GetModuleServHttp() mod_spec.IKernelModule {
|
|
|
modServHttp := mod_serv_http.GetModuleServHttp()
|
|
|
return modServHttp
|
|
|
@@ -170,7 +170,7 @@ func GetModuleServHttp() mod_spec.IKernelModule {
|
|
|
|
|
|
// GetModuleKernelCtx -- возвращает модуль для IKernelCtx.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func GetModuleKernelCtx() mod_spec.IKernelModule {
|
|
|
kModCtx := mod_kctx.GetModuleKernelCtx()
|
|
|
return kModCtx
|
|
|
@@ -178,7 +178,7 @@ func GetModuleKernelCtx() mod_spec.IKernelModule {
|
|
|
|
|
|
// GetModuleKernelKeeper -- возвращает модуль для IKernelKeeper.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func GetModuleKernelKeeper() mod_spec.IKernelModule {
|
|
|
modKernelKeeper := mod_keeper.GetModuleKeeper()
|
|
|
return modKernelKeeper
|
|
|
@@ -186,7 +186,7 @@ func GetModuleKernelKeeper() mod_spec.IKernelModule {
|
|
|
|
|
|
// GetModuleWui -- возвращает модуль для WUI.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func GetModuleWui() mod_spec.IKernelModule {
|
|
|
modWui := mod_wui.GetModuleWui()
|
|
|
return modWui
|
|
|
@@ -200,7 +200,7 @@ type LogBufParam = mL1.LogBufParam
|
|
|
|
|
|
// NewLogBuf -- возвращает новый буферизованный лог.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewLogBuf(param *LogBufParam) ILogBuf {
|
|
|
log := mL1.NewLogBuf(param)
|
|
|
return log
|
|
|
@@ -208,7 +208,7 @@ func NewLogBuf(param *LogBufParam) ILogBuf {
|
|
|
|
|
|
// NewSafeBoolReact -- возвращает новую потокобезопасную реактивную булеву переменную.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewSafeBoolReact() core_spec.ISafeBoolReact {
|
|
|
val := mL1.NewSafeBoolReact()
|
|
|
return val
|
|
|
@@ -216,7 +216,7 @@ func NewSafeBoolReact() core_spec.ISafeBoolReact {
|
|
|
|
|
|
// NewSafeInt -- возвращает новую потокобезопасную целочисленную переменную.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewSafeInt(val defs.Int) core_spec.ISafeInt {
|
|
|
val_ := mL1.NewSafeInt(val)
|
|
|
return val_
|
|
|
@@ -224,7 +224,7 @@ func NewSafeInt(val defs.Int) core_spec.ISafeInt {
|
|
|
|
|
|
// NewInt -- возвращает новую целочисленную переменную.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewInt(val defs.Int) core_spec.Int {
|
|
|
val_ := mL1.NewInt(val)
|
|
|
return val_
|
|
|
@@ -232,7 +232,7 @@ func NewInt(val defs.Int) core_spec.Int {
|
|
|
|
|
|
// NewLocalCtx -- возвращает новый локальный контекст.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewLocalCtx(ctx context.Context) comp_spec.ILocalCtx {
|
|
|
lCtx := mL1.NewLocalCtx(ctx)
|
|
|
return lCtx
|
|
|
@@ -240,7 +240,7 @@ func NewLocalCtx(ctx context.Context) comp_spec.ILocalCtx {
|
|
|
|
|
|
// NewSafeString -- возвращает новую потокобезопасную строку.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func NewSafeString() core_spec.ISafeString {
|
|
|
str := mL1.NewSafeString()
|
|
|
return str
|
|
|
@@ -261,7 +261,7 @@ type FnHassert = mL1.FnHassert
|
|
|
|
|
|
// Hassert -- возвращает ссылку на функцию Hassert.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func Hassert() FnHassert {
|
|
|
return mL1.FnHassert(helpers.Hassert)
|
|
|
}
|
|
|
@@ -271,7 +271,7 @@ type FnAssert = mL1.FnAssert
|
|
|
|
|
|
// Assert -- возвращает ссылку на функцию Hassert.
|
|
|
//
|
|
|
-//go:fix inline
|
|
|
+
|
|
|
func Assert() FnAssert {
|
|
|
return mL1.FnAssert(helpers.Assert)
|
|
|
}
|