Commit Graph

2076 Commits

Author SHA1 Message Date
gezimblliku
73a7590f1c added profiles,configs and services for trend && ranking 2024-08-02 09:37:52 +02:00
Gezim Blliku
80249e1074 implemented janusagent & added to services 2024-07-21 19:07:43 +02:00
arberkatellari
de5db4a938 Add caching_delay to config and loaders 2024-03-06 16:16:08 +01:00
arberkatellari
727f90fc6b Add CAPs counting to cgr-console status command 2024-03-04 19:17:53 +01:00
arberkatellari
2e4d8bdcf4 Remove unnecessary LazySanityCheck 2024-01-06 17:12:02 +01:00
arberkatellari
ca01cbcd6b Replacing old log_level from configs with new logger->level 2024-01-06 17:12:02 +01:00
ionutboangiu
5f4da20881 Add *refund dynamic opt for cdrs section 2023-12-12 10:09:18 +01:00
ionutboangiu
560f42bf8d Add store block back inside *CDRServer.processEvents
Added *store and *rerate dynamic opts for cdrs.
2023-12-12 10:09:18 +01:00
gezimbll
3403a91a2b Revise integration tests 2023-11-29 16:25:18 +01:00
gezimbll
32ed816de7 Replacing IsSliceMember ,CloneStringSlice and SliceStringEqual with slices package functions 2023-11-01 21:38:27 +01:00
gezimbll
7c80bd1002 Remove unreachable err cases from HandleJSONErr
json.UnmarshalError happens only when we pass a non-nil pointer, which
is not the case for us. Usage of go vet helps us make sure it also
won't be happening in the future
2023-10-26 15:59:34 +02:00
arberkatellari
0ca5d3ad20 Change default storedb password 2023-10-25 16:37:19 +02:00
ionutboangiu
4c34d321de Add sanity check to prevent xml reader panic
HierarchyPath parser now returns nil when
the path is empty (instead of a string slice with one
EmptyString element).

If isAbsolute is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. Alternatively, if isAbsolute is false, it
will just return . to signal that the path currently
being processed is the one required.This avoids a nil
expr error coming from the xmlquery library.

Use the Query and QueryAll functions from the xmlquery
package to be able to handle the errors ourselves and
avoid panics.

Remove config default value for xmlRootPath. The field
will remain commented in config_defaults for reference.

Add tests for HierarchyPath.AsString function.

Add comments for XmlProvider and xmlRootPath opt.

Update XmlProvider String() func based on the comment
which specifies that it should display the already
parsed values out of cache.
2023-10-19 17:19:30 +02:00
ionutboangiu
d0a435aa6d Migrate to new jetstream API
Upgraded go.mod nats version due to an issue caused by version mismatch
between driver and server (uncertain).

Renamed function from getProcessOptions to getProcessedOptions.

## *NatsER.Serve

- Replaced ChanQueueSubscribe with QueueSubscribe for Core NATS consumer
to handle the message processing directly.

- Since QueueSubscribe is now used regardless of jetstream status, the
message handler has been assigned to a separate variable that can be
reused.

-  The message handler is now dealing with the message processing
directly, therefore the select case listening for the channel which is
feeding NATS messages can be removed together with the channel itself
and the select. Currently, the goroutine within Serve only has to block
until the rdrExit chan is closed.

- Moved the resource check inside the handler right before starting the
message processing goroutine.

## *NatsEE.parseOpts

- Renamed function from parseOpt to parseOpts.

- Handled the error coming from GetNatsOpts function.

## *NatsEE.Connect

- Updated function to return early in case of non-nil nats.Conn value
to reduce nesting.

## *NatsEE.ExportEvent

- Use defer to release resources and RUnlock.

## *NatsEE.Close

- Use defer to Unlock.

- Update function to return early in case of nil nats.Conn value to
reduce nesting.

## ees.GetNatsOpts

- Chose switch over if else when parsing client certificate and keys
opts.

- Updated function to return the errors directly instead of assigning
them to a separate variable right before returning.

## ers.GetNatsOpts

- Chose switch over if else when parsing client certificate and keys
opts.

- Updated function to return the errors directly instead of assigning
them to a separate variable right before returning.

Removed tab from commented natsJetStreamMaxWaitProcessed option
value in config_defaults.go under ers section.

Added integration test for ERs NATS.

Updated ees/ers implementation to use the jetstream package which
separates the jetstream context from Core NATS.

Removed the jsOpts fields from the NatsEE struct. We are now using the
jetStreamMaxWait option directly through a timeout context.

Added streamName option for NATS reader since it is now required to be
specified when creating a consumer (it is not inferred based on subject
anymore).

Updated nats ers integration tests.

Updated tests to also use the new jetstream package.

Updated tests to start the nats-server using their official driver
instead of using the std go exec package. time.Sleeps are now not
required anymore to wait for the server.

In test configurations for nats readers, made sure that natsStreamName
option is populated. It is now required for consumers to know where to
subscribe.
2023-09-28 20:48:39 +02:00
NikolasPetriti
8ef305d64c Add coverage tests for utils and config 2023-09-12 18:10:23 +02:00
NikolasPetriti
24dde0f351 Add coverage tests for config 2023-09-11 12:20:45 +02:00
NikolasPetriti
c474c9b8af Add coverage tests for config 2023-09-06 19:12:44 +03:00
arberkatellari
770454c007 Renew DlgList, DNSAgent & add SRV/A support 2023-08-28 12:27:53 +02:00
arberkatellari
6eda4303f5 Revise DNS Agent and Service 2023-08-28 12:27:53 +02:00
gezimbll
990feb0f26 fixing tests for ees 2023-08-02 16:49:33 +02:00
gezimbll
16238fb3cb Added sentrypeercfg tests 2023-08-02 16:49:33 +02:00
gezimbll
7cb144f57b Added sentrypeer filter type 2023-08-02 16:49:33 +02:00
gezimbll
5b5a159706 Added sentrypeer filter type 2023-08-02 16:49:33 +02:00
gezimbll
fcc9fc109b Updated go-elasticsearch client 2023-07-04 13:18:54 +02:00
ionutboangiu
113e2a2bdf Replace interface{} with any 2023-05-31 10:22:28 +02:00
gezimbll
af13805a60 Fix cloning of variables with independent copy 2023-05-25 07:55:35 +02:00
gezimbll
5837b37566 Fix cloning of variables with independent copy 2023-05-25 07:55:35 +02:00
ionutboangiu
5227b4d447 Solve compilation errors in tests after CDRs service update 2023-05-03 10:05:28 +02:00
ionutboangiu
85a2e66499 Add unit tests for stordbcfg.go 2023-05-03 10:05:28 +02:00
ionutboangiu
df1dc5e838 Add StorDB service
Add StorDB to config and services.

Put back the store_cdrs option under cdrs and update the CDRs
service to depend on StorDB.

Define the StorDB interface and add a constructor for it.

Add a constructor for postgres storage.

Add a config sanity check to validate SSL modes for postgres.

Update cgr-engine to consider StorDB on startup.
2023-05-03 10:05:28 +02:00
gezimbll
04d05c3a4f replacing non-meta constants for storage types 2023-03-08 19:13:48 +01:00
ionutboangiu
8620b23231 Implement EventExporterCfg constructor and get rid of boilerplate code 2023-03-08 19:12:48 +01:00
ionutboangiu
db3ff231c6 Add options for SASL PLAIN auth (amqp 1.0) 2023-02-22 18:21:10 +01:00
arberkatellari
c216fad65c Improving loadConfigFromHTTP redundant URL parse & testing it 2022-12-12 11:20:08 +02:00
arberkatellari
ca47fb72ef Improving coverage in config 2022-12-02 18:41:55 +02:00
arberkatellari
0539893157 Improving coverage at config 2022-12-02 18:41:55 +02:00
arberkatellari
cef7de30d8 Improving coverage at config 2022-12-02 18:41:55 +02:00
arberkatellari
27ad99e88c Improving covarage at /config 2022-11-30 16:58:04 +02:00
arberkatellari
6810efb7ef Improving coverage at /config 2022-11-30 16:58:04 +02:00
arberkatellari
50e2a6a469 Adding KafkaCAPathProcessed to EventReaderOpts Clone() function 2022-11-30 16:58:04 +02:00
arberkatellari
0363395ae0 Improving coverage at /config 2022-11-30 16:58:04 +02:00
arberkatellari
6db0a8088b Improving coverage at config 2022-11-30 16:58:04 +02:00
arberkatellari
b6b486c581 Removed unnecessary blank spaces 2022-11-22 13:58:17 +02:00
arberkatellari
4a01e20569 Improving Coverage at Config 2022-11-22 13:58:17 +02:00
adi
734776b113 Unified consts of opts 2022-10-03 18:29:24 +03:00
adi
1e51b6d73f Unified constants for subsystem/removed big S 2022-09-25 12:16:25 +02:00
DanB
50b058e547 DispatcherS with *routeID and failover support 2022-09-22 13:01:37 +02:00
ionutboangiu
9dc0133207 Implement reply_timeout opt for RPCPool 2022-09-20 10:26:43 +02:00
adi
eb594c5f7e Sanitization for cace conns 2022-09-12 18:31:10 +02:00
adi
1bcf5f7f91 New cacheCfg params 2022-09-12 18:31:10 +02:00