- clean go cache at the role level
- use go env GOMODCACHE for path resolution
- add become: true to prevent permission issues
- check stdout instead of stderr for go clean -x --cache
- cache cleaning is skipped by default
- fix lint errors
Previously made two trips (get and set) for each group of items from
an index key being removed. Now, we fetch indexes once at the beginning
and store the updated indexes once at the end.
Related to #4357
- Set (but comment) serverAPI options (currently distinct api and
create.size BSON field are deprecated + possible others that are untested)
- Rename and refactor 'TimeDecodeValue1' to 'decodeTimeValue', add
nil case handling
- Implement 'buildURL' function to connect to mongo (can also be
used for mysql and postgres)
- Update function names, variable names, and comments for clarity
- Replace 'bsonx.Regex' with the Regex primitive for v1.12 compatibility
- Use simple concatenation instead of Sprintf
- Declare 'timeType' locally, replace global 'tTime'
- Use 'RegisterTypeDecoder' to replace deprecated 'RegisterDecoder'
- Simplify several functions without altering functionality
- Remove redundant 'storageType' field in 'mongoStorage',
use 'isDataDB' instead
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.