|
|
@@ -5,8 +5,8 @@ import (
|
|
|
"context"
|
|
|
|
|
|
mL0 "gitp78su.ipnodns.ru/svi/kern/v4/lev0"
|
|
|
- mKa "gitp78su.ipnodns.ru/svi/kern/v4/lev0/alias"
|
|
|
- mKt "gitp78su.ipnodns.ru/svi/kern/v4/lev0/ktypes"
|
|
|
+ mKd "gitp78su.ipnodns.ru/svi/kern/v4/lev0/defs"
|
|
|
+ mKs "gitp78su.ipnodns.ru/svi/kern/v4/lev0/kspec"
|
|
|
mL1 "gitp78su.ipnodns.ru/svi/kern/v4/lev1"
|
|
|
"gitp78su.ipnodns.ru/svi/kern/v4/lev2/kbus_http"
|
|
|
"gitp78su.ipnodns.ru/svi/kern/v4/lev2/kbus_http/client_bus_http"
|
|
|
@@ -24,7 +24,7 @@ import (
|
|
|
)
|
|
|
|
|
|
// GetKernelCtx -- возвращает контекст ядра.
|
|
|
-func GetKernelCtx() mKt.IKernelCtx {
|
|
|
+func GetKernelCtx() mKs.IKernelCtx {
|
|
|
ctx := kctx.GetKernelCtx()
|
|
|
return ctx
|
|
|
}
|
|
|
@@ -45,25 +45,25 @@ func WrapErr[T any](res mL0.IResult[T], err error) mL0.IResult[T] {
|
|
|
}
|
|
|
|
|
|
// GetKernelStoreKv -- возвращает быстрое key-value хранилище ядра.
|
|
|
-func GetKernelStoreKv() mKt.IKernelStoreKv {
|
|
|
+func GetKernelStoreKv() mKs.IKernelStoreKv {
|
|
|
store := kstore_kv.GetKernelStore()
|
|
|
return store
|
|
|
}
|
|
|
|
|
|
// GetKernelServerHttp -- возвращает веб-сервер ядра.
|
|
|
-func GetKernelServerHttp() mKt.IKernelServerHttp {
|
|
|
+func GetKernelServerHttp() mKs.IKernelServerHttp {
|
|
|
kernServHttp := kserv_http.GetKernelServHttp()
|
|
|
return kernServHttp
|
|
|
}
|
|
|
|
|
|
// NewSafeBool -- возвращает новый потокобезопасный булевый признак.
|
|
|
-func NewSafeBool() mKt.ISafeBool {
|
|
|
+func NewSafeBool() mKs.ISafeBool {
|
|
|
sb := mL1.NewSafeBool()
|
|
|
return sb
|
|
|
}
|
|
|
|
|
|
// GetKernelBusLocal -- возвращает локальную шину данных.
|
|
|
-func GetKernelBusLocal() mKt.IKernelBus {
|
|
|
+func GetKernelBusLocal() mKs.IKernelBus {
|
|
|
kCtx := kctx.GetKernelCtx()
|
|
|
kCtx.Set("monolitName", "unknown monolit", "GetKernelBusLocal()")
|
|
|
lBus := kbus_local.GetKernelBusLocal()
|
|
|
@@ -71,7 +71,7 @@ func GetKernelBusLocal() mKt.IKernelBus {
|
|
|
}
|
|
|
|
|
|
// GetKernelBusHttp -- возвращает HTTP шину данных.
|
|
|
-func GetKernelBusHttp() mKt.IKernelBus {
|
|
|
+func GetKernelBusHttp() mKs.IKernelBus {
|
|
|
bus := kbus_http.GetKernelBusHttp()
|
|
|
return bus
|
|
|
}
|
|
|
@@ -82,7 +82,7 @@ func SleepMs() {
|
|
|
}
|
|
|
|
|
|
// GetMonolitLocal -- возвращает монолит с локальной шиной.
|
|
|
-func GetMonolitLocal(name string) mKt.IKernelMonolit {
|
|
|
+func GetMonolitLocal(name string) mKs.IKernelMonolit {
|
|
|
kCtx := kctx.GetKernelCtx()
|
|
|
kCtx.Set("isLocal", true, "bus type")
|
|
|
for {
|
|
|
@@ -98,7 +98,7 @@ func GetMonolitLocal(name string) mKt.IKernelMonolit {
|
|
|
}
|
|
|
|
|
|
// GetMonolitHttp -- возвращает монолит с локальной шиной поверх HTTP.
|
|
|
-func GetMonolitHttp(name string) mKt.IKernelMonolit {
|
|
|
+func GetMonolitHttp(name string) mKs.IKernelMonolit {
|
|
|
kCtx := kctx.GetKernelCtx()
|
|
|
_ = kbus_http.GetKernelBusHttp()
|
|
|
kCtx.Set("isLocal", false, "bus type")
|
|
|
@@ -114,79 +114,79 @@ func GetMonolitHttp(name string) mKt.IKernelMonolit {
|
|
|
}
|
|
|
|
|
|
// NewKernelModule -- возвращает новый модуль на ядре.
|
|
|
-func NewKernelModule(name *mKa.AModuleName) mKt.IKernelModule {
|
|
|
+func NewKernelModule(name *mKd.ModuleName) mKs.IKernelModule {
|
|
|
resMod := kmodule.NewKernelModule(name)
|
|
|
return resMod
|
|
|
}
|
|
|
|
|
|
// NewClientBusLocal -- возвращает клиент для работы с локальной шиной.
|
|
|
-func NewClientBusLocal() mKt.IBusClient {
|
|
|
+func NewClientBusLocal() mKs.IBusClient {
|
|
|
lClient := client_bus_local.NewClientBusLocal()
|
|
|
return lClient
|
|
|
}
|
|
|
|
|
|
// NewClientBusHttp -- возвращает клиент для работы с шиной поверх HTTP.
|
|
|
-func NewClientBusHttp(url string) mKt.IBusClient {
|
|
|
+func NewClientBusHttp(url string) mKs.IBusClient {
|
|
|
client := client_bus_http.NewClientBusHttp(url)
|
|
|
return client
|
|
|
}
|
|
|
|
|
|
// GetModuleServHttp -- возвращает модуль для IKernelServHttp.
|
|
|
-func GetModuleServHttp() mKt.IKernelModule {
|
|
|
+func GetModuleServHttp() mKs.IKernelModule {
|
|
|
modServHttp := mod_serv_http.GetModuleServHttp()
|
|
|
return modServHttp
|
|
|
}
|
|
|
|
|
|
// GetModuleKernelCtx -- возвращает модуль для IKernelCtx.
|
|
|
-func GetModuleKernelCtx() mKt.IKernelModule {
|
|
|
+func GetModuleKernelCtx() mKs.IKernelModule {
|
|
|
kModCtx := mod_kctx.GetModuleKernelCtx()
|
|
|
return kModCtx
|
|
|
}
|
|
|
|
|
|
// GetModuleKernelKeeper -- возвращает модуль для IKernelKeeper.
|
|
|
-func GetModuleKernelKeeper() mKt.IKernelModule {
|
|
|
+func GetModuleKernelKeeper() mKs.IKernelModule {
|
|
|
modKernelKeeper := mod_keeper.GetModuleKeeper()
|
|
|
return modKernelKeeper
|
|
|
}
|
|
|
|
|
|
// GetModuleWui -- возвращает модуль для WUI.
|
|
|
-func GetModuleWui() mKt.IKernelModule {
|
|
|
+func GetModuleWui() mKs.IKernelModule {
|
|
|
modWui := mod_wui.GetModuleWui()
|
|
|
return modWui
|
|
|
}
|
|
|
|
|
|
// NewLogBuf -- возвращает новый буферизованный лог.
|
|
|
-func NewLogBuf(opts ...mL1.OptionLogBuf) mKt.ILogBuf {
|
|
|
+func NewLogBuf(opts ...mL1.OptionLogBuf) mKs.ILogBuf {
|
|
|
log := mL1.NewLogBuf(opts...)
|
|
|
return log
|
|
|
}
|
|
|
|
|
|
// NewSafeBoolReact -- возвращает новую потокобезопасную реактивную булеву переменную.
|
|
|
-func NewSafeBoolReact() mKt.ISafeBoolReact {
|
|
|
+func NewSafeBoolReact() mKs.ISafeBoolReact {
|
|
|
val := mL1.NewSafeBoolReact()
|
|
|
return val
|
|
|
}
|
|
|
|
|
|
// NewSafeInt -- возвращает новую потокобезопасную целочисленную переменную.
|
|
|
-func NewSafeInt(val int) mKt.ISafeInt {
|
|
|
+func NewSafeInt(val int) mKs.ISafeInt {
|
|
|
val_ := mL1.NewSafeInt(val)
|
|
|
return val_
|
|
|
}
|
|
|
|
|
|
// NewInt -- возвращает новую целочисленную переменную.
|
|
|
-func NewInt(val int) mKt.Int {
|
|
|
+func NewInt(val int) mKs.Int {
|
|
|
val_ := mL1.NewInt(val)
|
|
|
return val_
|
|
|
}
|
|
|
|
|
|
// NewLocalCtx -- возвращает новый локальный контекст.
|
|
|
-func NewLocalCtx(ctx context.Context) mKt.ILocalCtx {
|
|
|
+func NewLocalCtx(ctx context.Context) mKs.ILocalCtx {
|
|
|
lCtx := mL1.NewLocalCtx(ctx)
|
|
|
return lCtx
|
|
|
}
|
|
|
|
|
|
// NewSafeString -- возвращает новую потокобезопасную строку.
|
|
|
-func NewSafeString() mKt.ISafeString {
|
|
|
+func NewSafeString() mKs.ISafeString {
|
|
|
str := mL1.NewSafeString()
|
|
|
return str
|
|
|
}
|