mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
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.