ionutboangiu
712aeb0d4a
Revise StateDeps implementation
...
Now tracks states by passing around an empty struct as a signal to
states defined on the service, as opposed to signal state changes by
closing the channel. This makes sure services can only be in one
state at once and allows for multiple state changes which were not
possible before.
2025-02-07 13:23:59 +01:00
ionutboangiu
652d1e68cf
Remove cls fields from service structs
...
now retrieved through registry.Lookup
2025-01-24 12:02:24 +01:00
ionutboangiu
3f0bb4df43
Move libcgr-engine into cgr-engine.go + flags refactor
2025-01-21 19:59:17 +01:00
ionutboangiu
ba9c2e1e3f
Integrate cgrRunPreload inside LoaderService.Start
2025-01-21 19:59:17 +01:00
armirveliaj
7db65ca62c
Clean up DispatcherS
2025-01-17 17:29:46 +01:00
ionutboangiu
e23759b4a8
Init services directly in Service slice
...
except CoreService that needs to be referenced in
case CPU profiling is enabled via flags and needs
to be stopped before CoreService starts managing it
2025-01-16 15:51:52 +01:00
ionutboangiu
3d693aefe5
Remove srvDep map
...
Now syncing on shutdown based on states
2025-01-16 15:51:52 +01:00
ionutboangiu
7ffe0ae2f5
Remove unused csCh from CoreService struct
...
Synchronization is now done via state deps.
2025-01-16 15:51:52 +01:00
ionutboangiu
6be26def4f
Implement CapService
2025-01-16 15:51:52 +01:00
ionutboangiu
04f746c634
Implement LoggerService + refactoring (incomplete)
2025-01-14 19:00:37 +01:00
ionutboangiu
e7152dacf8
Implement ConnManager service
...
Use it to register internal rpc conns instead of ServManager
DispatcherS now waits for AttributeS to start (only when enabled)
2025-01-14 19:00:37 +01:00
ionutboangiu
bf3d9a3281
Export funcs that wait for service state
2025-01-14 19:00:37 +01:00
ionutboangiu
089dfc00ae
Use SyncedChan to handle shutdown
2025-01-14 19:00:37 +01:00
ionutboangiu
c49e67b2ed
Handle SERVICE_UP/DOWN states on ServManager layer
2025-01-14 19:00:37 +01:00
ionutboangiu
dab152f976
Integrate StateServiceDOWN + registry related refactor
...
Removed redundant IsRunning service method
Removed registry from constructors
Pass registry to Start/Reload/Shutdown service methods
2025-01-14 19:00:37 +01:00
ionutboangiu
396227d639
Refactor ServiceIndexer implementation
...
Renamed to ServiceRegistry
Improved comments
2025-01-10 20:18:08 +01:00
ionutboangiu
20ee079e12
Use the waitForServicesToReachState helper
2025-01-10 20:18:08 +01:00
ionutboangiu
b68a804967
Implement helper methods for waiting on service states
2025-01-10 20:18:08 +01:00
ionutboangiu
09b75a1045
Let ServManager manage all services except itself
2025-01-10 20:18:08 +01:00
ionutboangiu
dcb38c78bf
Implement function to check for service state
2025-01-10 20:18:08 +01:00
ionutboangiu
17405af987
Revise service manager logs
...
Logging is now done as ServiceManager level. Removed any other logs.
2025-01-10 20:18:08 +01:00
ionutboangiu
c8a3ebe5e8
Use channel instead of context to handle shutdown
2025-01-10 20:18:08 +01:00
ionutboangiu
d9359a4005
Implement GuardianService and ConfigService
...
And use ServiceIndexer to sync with them
2025-01-10 20:18:08 +01:00
ionutboangiu
da2052e7b3
Implement FilterService
...
And use ServiceIndexer to sync with it
2024-12-12 11:55:14 +01:00
ionutboangiu
db301f7901
Remove StorDB service param from service constructors
...
Use ServiceIndexer instead.
Remove CDRs ListenAndServe method.
Pass the storDB connection directly to constructors instead of the
channel.
2024-12-12 11:55:14 +01:00
ionutboangiu
10dfcc5e48
Remove dmS parameter from service constructors
...
Use ServiceIndexer instead
2024-12-12 11:55:14 +01:00
ionutboangiu
55ecdf45e4
Remove clsChan in favor of using the service indexer
2024-12-12 11:55:14 +01:00
ionutboangiu
98b5b74b23
Remove cacheS parameter from service constructors
...
ServiceIndexer will be used instead
2024-12-12 11:55:14 +01:00
ionutboangiu
77af4f95b3
Remove anzCh in favor of using the service indexer
2024-12-10 18:53:13 +01:00
ionutboangiu
0783984bfe
Remove srvDep from services that don't use it
2024-12-05 20:12:08 +01:00
ionutboangiu
79e461e7c5
Remove redundant internal channels
...
only from services that have dedicated files
2024-12-04 19:28:50 +01:00
ionutboangiu
cfdb3e80ca
Integrate state deps across services for SERVICE_UP
2024-12-04 19:28:50 +01:00
ionutboangiu
c29f1fdd35
Remove services/cgr-engine.go
...
Trying to move services init before CGREngine constructor makes it pointless,
as it's only used as a dependency storage for services init.
2024-12-04 09:06:59 +01:00
DanB
2dfa1e7035
Adding initial stopChan to the engine
2024-12-01 20:22:47 +01:00
DanB
476f5ba877
Services with IntRPCConn method
2024-11-30 19:13:19 +01:00
DanB
6b241ee35b
Adding serviceIndexer and StateDependencies
2024-11-28 14:56:03 +01:00
DanB
23e5f0e387
Add generic way to insert services inside services/CGREngine
2024-11-26 14:03:57 +01:00
DanB
76398441da
Simplify running of the engine via only one Run command
2024-11-26 12:50:08 +01:00
DanB
3b195dcf1d
Adding StateIndexer, ServiceIndexer, StateDeps
2024-11-23 20:14:07 +01:00
gezimbll
bb0116c543
added it test && loaders templates for ranking and trend profiles
2024-11-22 20:29:27 +01:00
ionutboangiu
1453234293
Use channel instead of wait func (AnalyzerS)
2024-11-14 17:48:09 +01:00
ionutboangiu
59f8b1379e
Use channel instead of wait func (CLS)
2024-11-14 17:48:09 +01:00
ionutboangiu
a1ed51b301
Comment services tests
2024-11-14 17:48:09 +01:00
ionutboangiu
21409fc92e
Add new CommonListenerService
2024-11-14 17:48:09 +01:00
ionutboangiu
e78722ae4e
Init cM,caps,cls,wg inside CGREngine constructor
...
Also pass the profile to the CGREngine struct the moment profiling started.
2024-11-14 17:48:09 +01:00
ionutboangiu
0d9358cf30
Ensure services wait for AnalyzerS to be initiated
...
Same logic as waiting for FilterS/DataDBService.
The difference will be that services will only wait when AnalyzerS
is enabled.
2024-11-14 17:48:09 +01:00
ionutboangiu
b7038dd61e
Rename AnalyzerS constructor
...
NewAnalyzerService -> NewAnalyzerS
2024-11-14 17:48:09 +01:00
ionutboangiu
bb9bfbb19b
Rename CommonListenerS constructor
...
NewServer -> NewCommonListenerS
2024-11-14 17:48:09 +01:00
ionutboangiu
5bf8f1756c
Extract cores.Server into new commonlisteners package
...
Functionality is the same.
Server has been renamed to CommonListenerS.
2024-11-04 21:23:15 +01:00
ionutboangiu
213b67fbb0
Revise registrarc integration test
2024-11-04 21:22:58 +01:00