Commit Graph

14009 Commits

Author SHA1 Message Date
ionutboangiu
deaf5f4918 Move config/objdp.go to utils package
and rename the file to objectdp.go
2025-02-24 13:36:32 +01:00
ionutboangiu
3254e0d35f Export RSRParser Path field
configsanity and its tests need access to it
2025-02-24 13:36:32 +01:00
ionutboangiu
b1a5874215 Move config/rsrparser.go to utils package 2025-02-24 13:36:32 +01:00
ionutboangiu
36a7d174ab Remove RSRSep opt from general section
- allows RSRParser to be split gracefully from config (was depending on
  RSRSep, which was retrieved from the global config variable)
- default separator (;) was the only one used except for splitting
  inline attribute values (where ANDSep is used)
2025-02-24 13:36:32 +01:00
ionutboangiu
c60712f454 Bump go version to 1.24.0 2025-02-21 13:22:04 +01:00
armirveliaj
4b1e6e7def Add coverage tests on engine 2025-02-20 12:05:39 +01:00
armirveliaj
ad0b45b4d2 Add coverage tests on accounts && engine 2025-02-20 12:05:39 +01:00
gezimbll
18b0e4d417 added new dynopts function GetDurationPointerOpts 2025-02-20 09:54:13 +01:00
gezimbll
14515404bb added helper method for repetive logic on GetOpts funcs 2025-02-13 19:18:40 +01:00
armirveliaj
d2c175141f Add coverage tests on SessionS 2025-02-13 19:17:20 +01:00
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