Commit Graph

53 Commits

Author SHA1 Message Date
gezimblliku
6c8f53435b fixed go vet warnings 2024-08-16 12:34:25 +02:00
ionutboangiu
c0da66959b Mock GoRPC Cancel method to handle harmless RPC error
This 'can't find service' error is harmless and occurs due to a
mismatch between the standard net/rpc server and the cgrates/birpc
client. The standard server does not support context cancellation
requests sent by the client.

Fixes #4357
2024-07-08 12:11:11 +02:00
ionutboangiu
62619ba3a5 Replace interface{} with any 2023-06-05 10:55:32 +02:00
ionutboangiu
cb7ea790de Update rpcclient library to latest version
Replace all instances of rpcclient.ClientConnector with birpc.ClientConnector.

Pass context, maxReconnectInterval, delayFunc and birpcClient to rpcclient
constructors.

Remove redundant time.Duration conversions (e.g. time.Duration(1*time.Second)
now becomes time.Second.

Add context where needed (context.Background() for tests, context.TODO()
for places where it should be passed from somewhere else).

Implement that functionality of the SessionSv1.Sleep call, in sessions/sessions
instead of apier/v1.

Make changes in utils/server.go (replacing the old rpc2 library with github.com/cgrates/birpc).

Change the way we register birpc methods for sessions in services, using a helper function
defined in engine/libengine.go.
2023-05-03 10:02:15 +02:00
ionutboangiu
82468c580d Replace deprecated ioutil library, remove redundant statements + small optimizations 2022-12-02 14:24:18 +02:00
TeoV
28af81a818 Remove print from code 2020-07-09 17:27:11 +03:00
TeoV
40987e13fd Import in v0.10 Concurrent mechanism 2020-07-09 17:27:11 +03:00
Trial97
33ce18585c Updated server error message 2020-05-29 12:19:59 +02:00
Trial97
a4870c5434 Updated FailedCDR posting 2020-01-28 10:07:34 +01:00
Trial97
b4fe82c6d7 Updated rpcclient library 2019-12-09 18:04:26 +02:00
Trial97
1ee6a98fac Preparing for gob RPC testing 2019-11-20 14:55:09 +01:00
Trial97
f6c1801368 Updated SessionS service shutdown 2019-10-28 12:17:15 +01:00
Trial97
0222d17f96 Updated message for TLS 2019-07-15 03:19:20 -10:00
TeoV
5cb5fb5661 Add benchmark tests for JSON and GOB in sessions_bench_test.go 2019-05-17 12:41:46 +02:00
TeoV
fbc9f2332d Add CustomJSONCoded in case that Apier is active on the same engine with dispatcher 2019-05-17 12:41:46 +02:00
TeoV
b86d83b2e8 Add json_codec 2019-05-17 12:41:46 +02:00
Trial97
060c83d61b Added pprof to https 2019-03-06 16:05:01 +01:00
Trial97
7f98299b73 Added check for httprof_path 2019-02-26 12:24:54 +01:00
Trial97
79829dd836 Added http_pprof_path in cgr-engine for exosing debug URL. fixes#1427 2019-02-22 17:27:58 +01:00
Trial97
3ee8539908 Moved pprof server on http server 2019-02-21 14:45:38 +01:00
TeoV
523a41ba56 Fixes #1243 2018-10-26 08:55:49 +02:00
TeoV
3e872ee47a Update TLS config to consider CA from Authorized hosts 2018-10-23 11:24:14 +02:00
TeoV
56cdf80db8 Remove TLSSkipVerify from server 2018-10-17 09:18:51 +02:00
TeoV
a03fe68839 Add Skip Verify for tls 2018-10-17 09:18:51 +02:00
TeoV
fc8f62ca03 Finish Updating all ibraries from glide 2018-09-20 15:05:12 +02:00
DanB
efc810e70d Begin HTTPAgent integration tests 2018-07-05 19:27:54 +02:00
TeoV
210fb00954 Add index biJSON connection for sessions 2018-06-14 17:35:08 +02:00
DanB
28a8a0b164 HTTPAgent as handler via cmd/cgr-engine 2018-06-06 19:45:58 +02:00
TeoV
3543d10e9c Update glide with new version of rpcclient 2018-06-05 14:44:24 +02:00
TeoV
b9e5744d33 Add test for http_tls connection 2018-06-05 14:44:24 +02:00
TeoV
7bd6c5841c Update TLS connection 2018-06-04 11:25:29 +03:00
TeoV
c0721295c9 Add TLS Authentification 2018-06-04 11:25:29 +03:00
TeoV
3bab281fda Remove unnecessary parameters from utils/server.go ServeHTTP 2018-03-16 18:17:20 +01:00
TeoV
50e58fbcaf Add HTTP config option CDRsURL 2018-03-16 18:17:20 +01:00
TeoV
ac6a1c0597 Add HTTP config option freeswiwtch_cdrs_url 2018-03-16 18:17:20 +01:00
DanB
526d63505f Avoid concurrency on variables in cmd/cgr-engine 2017-12-14 15:37:55 +01:00
edwardro22
b651b06826 Removed copyright from go doc 2017-09-10 15:02:46 +00:00
DanB
5573ed2da7 JSON-RPC2 to handle multiple connections via goroutines, fixes #674 2017-06-15 19:01:24 +02:00
DanB
839a754a43 Enabling Bidirectional RPC in SMGeneric 2017-01-24 20:45:10 +01:00
DanB
5281b7c051 Updating default cgrates.json config, small logs modifications in http server 2016-11-12 11:17:52 +01:00
Shane Neuerburg
7acfa6acbc Set up JSON RPC and WebSocket URLs to be configurable
This also allows the two URLs to be disabled entirely. Also in this commit is rudimentary basic auth support for WebSockets
2016-11-11 16:17:54 -07:00
Shane Neuerburg
0cfd025a0d Add basic authentication without dependencies
This adds a rudimentary basic auth scheme without including dependencies.
2016-11-10 16:35:08 -07:00
Shane Neuerburg
a88a1e75ed Add basic authentication to HTTP API
This adds support for basic authentication for the HTTP API with new configuration values to control if basic auth is used, the basic auth realm URL, and the location to a basic .htpasswd file.

github.com/abbot/go-http-auth is added as a dependency as it efficiently implements basic auth, as well as .htpasswd file monitoring.
2016-11-10 10:57:55 -07:00
DanB
5b126804ca Better error reporting in case of RPC issues 2016-10-28 18:35:48 +02:00
DanB
1f6ab1ba2f Error counting in RPC GOB and JSON 2016-10-27 19:22:44 +02:00
DanB
0f2a6ede59 BiRPCInternalClient, modifying SMGeneric to work as BiRPCServer interface 2016-09-22 21:21:29 +02:00
DanB
444a8efc16 Refactoring bidirectional connnections in SMGeneric for session disconnects 2016-09-21 11:33:27 +02:00
rinor
e929f93b6f rpc2 - github.com/cenkalti to github.com/cenk 2016-09-07 16:58:14 +02:00
DanB
401625861d Updated project README, COPYRIGHT information 2016-09-02 13:04:34 +02:00
Radu Ioan Fericean
b0fe280b34 improve reverse aliases 2015-11-23 14:23:34 +02:00