armirveliaj
ae8564ad50
Add coverage tests on sessionS
2025-02-07 13:26:56 +01:00
armirveliaj
6928674716
Add coverage tests on SessionS
2025-02-07 13:26:56 +01:00
armirveliaj
c34ae82539
Convert CDR.Opts[*accountsCost] to *utils.EventCharges
2025-02-07 13:26:56 +01:00
ionutboangiu
f89cad421e
Revise service toggle test
2025-02-07 13:23:59 +01:00
ionutboangiu
1d536c6390
Revise ServiceManagerV1.Status API
...
Allows querying for the status of all/multiple services at once.
Reply becomes a map[string]string, where the key is the service name
and the value represents the name of the state the service is in
(instead of returning just RUNNING/STOPPED).
2025-02-07 13:23:59 +01:00
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
gezimbll
df3dcfb840
replaced CGREvent parameter to DataProvider for GetOpts functions
2025-02-07 13:18:43 +01:00
gezimbll
3ebf3007a5
added startdelay config option for ers readers
2025-01-29 14:44:28 +01:00
ionutboangiu
92cdda136b
Update elasticsearch ansible role
...
- bump version from 8.8.0 to 8.16.1
- don't enable the systemd service by default(just start it)
- add restart handler on config changes
- configure before starting the service
- fix some linter errors
- hardcode auto_create_indexes to true
2025-01-29 10:52:24 +01:00
ionutboangiu
9bc51e7e64
Revise elasticsearch exporter integration test
2025-01-29 10:52:24 +01:00
ionutboangiu
ea25caa9fb
Add missing els clone and AsMapIface logic
2025-01-29 10:52:24 +01:00
ionutboangiu
2eebc7a236
Add config sanity checks for elasticsearch ee
2025-01-29 10:52:24 +01:00
ionutboangiu
92658d854e
Add elsCAPath opt and improve opt comments
2025-01-29 10:52:24 +01:00
ionutboangiu
f1b8fb8f40
Update default config sample
2025-01-29 10:52:24 +01:00
ionutboangiu
9ac147f3a3
Properly document elastic index req opts
2025-01-29 10:52:24 +01:00
ionutboangiu
9b9c7bb914
Make elasticsearch refresh opt configurable
2025-01-29 10:52:24 +01:00
ionutboangiu
c1331531a7
Remove unusable elasticsearch opts
2025-01-29 10:52:24 +01:00
ionutboangiu
035bac3688
elasticsearch: switch to fully-typed API
...
- index request options are now used directly during ExportEvent. They are
passed to the request as options only if they were configured in the first
place.
- implement PrepareMap and PrepareOrderMap methods for the elastic exporter.
bytePreparing methods are not needed anymore as the Event map can be exported
directly.
- elasticsearch.Client -> elasticsearch.TypedClient
- rename prepareOpts -> parseClientOpts
2025-01-29 10:52:24 +01:00
ionutboangiu
3a0579a8ea
Slightly refactor elastic exporter
...
now returns error in case of invalid logger type. Could be removed
in the future in favor of handling it in configsanity.go.
2025-01-29 10:52:24 +01:00
ionutboangiu
39ef7df677
Add context to ee constructor errors
2025-01-29 10:52:24 +01:00
ionutboangiu
e3b5c9ef84
Implement getter method for EventExporterCfg (by ID)
...
Removed redundant getter method for default EventExporterCfg.
2025-01-29 10:52:24 +01:00
ionutboangiu
5bd439020c
Prevent deadlock inside *els Connect
2025-01-29 10:52:24 +01:00
armirveliaj
a05834af81
Adding *accountsForceUsage variables for GetBoolOpts
2025-01-29 10:49:15 +01:00
armirveliaj
cae468454c
Adding *sessionSOriginID StringOpts variables
2025-01-29 10:49:15 +01:00
ionutboangiu
652d1e68cf
Remove cls fields from service structs
...
now retrieved through registry.Lookup
2025-01-24 12:02:24 +01:00
gezimbll
06ccafb5fd
added tests for opts with dynamic values
2025-01-22 17:36:26 +01:00
gezimbll
c602dbc2a5
added rsparser field in dynamicOpts
...
changed Value field to unexported and created a Value() method
on each dynOpts type that contains logic to create a rsparser
in case the value field a configuration starts with prefix "~"
otherwise it will return the specified value
2025-01-22 17:36:26 +01:00
ionutboangiu
de87ab04ad
Add short comments to all cgr-engine.go functions
2025-01-21 19:59:17 +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
4ce506faa9
Clean up redundant tests
2025-01-17 17:29:46 +01:00
armirveliaj
ef79d370d8
Clean up dispatcherS from storage
2025-01-17 17:29:46 +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
armirveliaj
9728908c56
Revise tests for sessions
2025-01-13 17:51:43 +01:00
armirveliaj
aea5fb0f18
Fix compilation errors
2025-01-13 13:39:50 +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