Commit Graph

1404 Commits

Author SHA1 Message Date
ionutboangiu
b09512a5c5 Implement *strip converter + tests 2023-10-09 21:08:28 +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
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
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
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
db3ff231c6 Add options for SASL PLAIN auth (amqp 1.0) 2023-02-22 18:21:10 +01:00
arberkatellari
cbe17dd080 Improving NewDispatcherService ServiceManagerS and its constant 2022-12-13 17:12:03 +02:00
adi
5d23b6433f Chanegd FileName consts into ers 2022-11-20 18:46:55 +01:00
ionutboangiu
c7ac907daf Add the missing dispatcher functions 2022-10-12 18:14:10 +02:00
adi
968e3d1871 Dispatcher cache and tests 2022-10-10 18:20:56 +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
7c18d51581 DispatcherS with caches remote/replication in alpha stage 2022-09-19 12:03:35 +02:00
ionutboangiu
f3bd4b63c0 Add support for kafka reader ssl encryption 2022-08-24 09:32:23 +03:00
ionutboangiu
f66f05d0e3 Add support for kafka ssl encryption 2022-08-24 09:32:23 +03:00
ionutboangiu
4c9b5b5cbe Add *dispatcherS opt 2022-08-17 20:27:30 +03:00
ionutboangiu
09c6261903 Fix issue where fib function overflows 2022-08-05 14:30:45 +02:00
adi
86d2f1476a Attemtps config change 2022-07-30 08:19:08 +02:00
adi
d847ec5d98 Apid and service of efs 2022-07-19 17:15:42 +02:00
adi
0e5fe2c341 Integrated efs in ees and logger 2022-07-19 17:15:42 +02:00
ionutboangiu
d9f567b0a3 Rename RedisMaxAttempts to RedisConnectionAttempts 2022-07-14 14:59:28 +02:00
adi
38a2824b05 Efs service and package 2022-07-13 19:24:50 +02:00
adi
bf870b1e2b Failover ees/loggers improved + tests 2022-07-11 17:27:46 +02:00
ionutboangiu
81793af5de Make hardcoded options configurable for redis and solve compilation errors 2022-07-07 18:05:14 +02:00
ionutboangiu
924a91c749 Change SSLMode to PgSSLMode 2022-07-03 13:08:52 +02:00
ionutboangiu
523045cc12 Add timeout options for redis and solve compilation errors 2022-07-03 13:08:52 +02:00
ionutboangiu
468b335ba6 Update dispatcherHost loader and repair it tests 2022-07-03 13:08:52 +02:00
ionutboangiu
2c0b74d0b6 Add constant for max_reconnect_interval config option 2022-07-03 13:08:52 +02:00
adi
c22f43c788 Failed posts and failover for export loggers 2022-06-29 12:00:42 +02:00
adi
63c0841b11 Implelemnted kafka logger 2022-06-29 12:00:42 +02:00
adi
7cfa7c2697 Logger config 2022-06-29 12:00:42 +02:00
ionutboangiu
e98f230f04 Change type name from Blockers to DynamicBlockers 2022-05-10 17:05:31 +02:00
ionutboangiu
ebee8c1233 Remove actionblockers 2022-05-06 20:49:11 +02:00
ionutboangiu
6bf4ec6dec Change logger name from *export to *ees 2022-05-06 20:49:11 +02:00
porosnicuadrian
cea929269a Blockers for account/balance + tp/cfgs and tests 2022-05-06 17:00:30 +02:00
porosnicuadrian
cbdfbe64c1 Updated config and tests/tp for blockers on accounts 2022-05-06 17:00:30 +02:00
ionutboangiu
52c79ca8db Change RouteBlockers type from bool to DynamicBlockers 2022-04-29 20:33:51 +02:00
ionutboangiu
065ffcfbdf Change blocker type from bool to DynamicBlockers for APActions 2022-04-29 20:33:51 +02:00
porosnicuadrian
575237ebcf Metrics blockers added in code 2022-04-28 14:54:01 +03:00
ionutboangiu
39c2d97333 Add Blockers field to ActionProfile + tests 2022-04-28 08:52:03 +02:00
porosnicuadrian
6561d4d110 New AttributeBlocker 2022-04-27 17:49:14 +02:00
porosnicuadrian
b16b44732e Modified blocker into Blockers for attributes 2022-04-21 15:27:27 +02:00
porosnicuadrian
7b763b56dd Improved populateCost and *ddc + tests 2022-04-20 20:29:01 +02:00
porosnicuadrian
e16266ad02 Updated metrics for *acc and *tcc 2022-04-20 20:29:01 +02:00
porosnicuadrian
8e7c7d1c75 Improved chargers reply for attributes 2022-04-20 10:35:59 +02:00
porosnicuadrian
729719bd4d Updated decimals + tests 2022-04-06 18:16:32 +02:00