Commit Graph

2586 Commits

Author SHA1 Message Date
ionutboangiu
bbf1eaf439 Import ansible roles 2023-09-28 20:48:39 +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
fdadd1ab81 Improve functionality for Drone CI 2023-09-26 21:30:25 +02:00
arberkatellari
1445fa3b49 Renew Drone CI 2023-09-01 18:01:43 +02:00
arberkatellari
770454c007 Renew DlgList, DNSAgent & add SRV/A support 2023-08-28 12:27:53 +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
ionutboangiu
3e22cef9cb Revise integration tests after StorDB addition 2023-05-03 10:05:28 +02:00
ionutboangiu
db3ff231c6 Add options for SASL PLAIN auth (amqp 1.0) 2023-02-22 18:21:10 +01:00
ionutboangiu
85f58d38bd Add integration tests for amqp exporter 2023-02-21 18:26:35 +01:00
ionutboangiu
20750d330f Add integration tests for amqpv1 exporter 2023-02-21 18:26:35 +01:00
ionutboangiu
3f11195bbe Revise kafka integration test 2023-02-21 18:26:35 +01:00
ionutboangiu
04c77fd8b3 Replace aws key and secret with placeholders 2023-01-25 13:06:06 +01:00
ionutboangiu
ce512854f2 Port sqs and s3 tests to 1.0 2023-01-23 17:10:34 +01:00
adi
5d23b6433f Chanegd FileName consts into ers 2022-11-20 18:46:55 +01:00
ionutboangiu
d5b3341c1a Add tests for csv filter separation 2022-11-11 13:44:23 +01:00
ionutboangiu
60a4da69e0 Implement start/stop/status methods for servmanager + tests 2022-10-21 10:16:23 +02:00
ionutboangiu
b5d646ecb5 Remove config identations 2022-10-14 18:42:06 +02:00
ionutboangiu
1a6f666ffe Add tests for tariffplan data converters 2022-10-14 18:42:06 +02:00
ionutboangiu
c7ac907daf Add the missing dispatcher functions 2022-10-12 18:14:10 +02:00
ionutboangiu
f9fbaeaeed Move authorization block to the main Dispatch function 2022-10-11 18:48:17 +02:00
adi
5b5a9f9b2f Dispatcher reviwed and it test fixes 2022-10-10 18:20:56 +02:00
adi
7267219789 Refactored dispatcher opts and new cache's APIs test 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
adi
70fa4f7a2b Bool opts and config modification 2022-09-22 20:22:34 +02:00
adi
67163a1ff5 Merge fixes 2022-09-22 20:22:34 +02:00
ionutboangiu
9dc0133207 Implement reply_timeout opt for RPCPool 2022-09-20 10:26:43 +02:00
adi
cf144cee74 Dispatcher otps/cache test 2022-09-19 16:39:47 +02:00
adi
18c5e3d8bc Disaptcher opts tests 2022-09-17 10:53:03 +02:00
ionutboangiu
ba35d39f2c Add tests for analyzers documentation 2022-09-12 10:05:56 +02:00
adi
1f308b9a64 DIspatcher opts test 2022-09-11 14:43:47 +02:00
ionutboangiu
b1c6f57c0c Add integration test for kafka exporter/reader 2022-08-24 17:35:25 +03:00
ionutboangiu
0653e9b5d7 Apply go fmt 2022-08-24 09:32:23 +03:00
adi
3c5a5aaa4e Route with accounts lcr 2022-08-23 20:31:53 +03:00
adi
97d14b2801 concurrency efs 2022-08-23 20:31:53 +03:00
ionutboangiu
20a39839af Repair tests and update cgrates cfg 2022-08-05 14:30:45 +02:00
adi
107932e3d2 context and efs service starting 2022-07-30 08:19:08 +02:00
adi
0eb61c965a Efs tests + improves 2022-07-30 08:19:08 +02:00
adi
86d2f1476a Attemtps config change 2022-07-30 08:19:08 +02:00
adi
8b14619fce Integrated efs 2022-07-13 19:24:50 +02:00
adi
2d5d01a664 Replayed failed loggs improvements 2022-07-12 16:25:28 +02:00
adi
bf870b1e2b Failover ees/loggers improved + tests 2022-07-11 17:27:46 +02:00
ionutboangiu
924a91c749 Change SSLMode to PgSSLMode 2022-07-03 13:08:52 +02:00
ionutboangiu
7299b09107 Add max_reconnect_interval for dispatcherhost csv models 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
ionutboangiu
1398cf3fd2 Add it test for kafka exporter 2022-05-10 17:05:31 +02:00
ionutboangiu
2ab43441de Revise api tests 2022-05-06 20:49:11 +02:00
ionutboangiu
e5878f40b6 Add config files for ees blocker test 2022-05-06 20:49:11 +02:00