Use flag.ExitOnError for automatic error handling.
Remove manual error check in main().
Set proper exit codes: 0 for help, 2 for parsing errors.
Avoid misleading '<InitS> error' log on help requests.
signal.Notify documentation states that:
Package signal will not block sending to c: the caller must ensure that c
has sufficient buffer space to keep up with the expected signal rate. For a
channel used for notification of just one signal value, a buffer of size 1
is sufficient.
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.
Since Responder can be started/reloaded/shut down through RALs, there is no need for ServiceManager to also be responsible for it. It also solves an issue where the RALs service would not be properly started because the manager had already started Responder before, and when RALs would try to do it as well, it returned with a 'service already running' error.