Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move RPC transport and analytics purger into package #1923

Merged
merged 4 commits into from
Oct 4, 2018

Conversation

dencoded
Copy link
Contributor

@dencoded dencoded commented Sep 28, 2018

Another potentially better approach for TykTechnologies/tyk-pump#80
This approach allows to move some re-usable part of RPC without changing RPC server side.

if it works then it cancels #1922 and https://github.com/TykTechnologies/tyk-sink/pull/51

The idea is to do rpc.Connect(...) where we supply connection info, a couple of call backs for emergency mode and map of rpc funcs definitions to add to RPC client dispatcher.

Then we can create rpc.Purger with all needed fields and run PurgeLoop with some ticker.

@dencoded dencoded requested a review from buger September 28, 2018 18:54
@buger
Copy link
Member

buger commented Oct 4, 2018

👌

@buger buger merged commit e640f4d into master Oct 4, 2018
@buger buger deleted the rpc-transport-package branch October 4, 2018 14:03
@joshblakeley
Copy link
Member

@dencoded Change here was causing panic in purger in slaved gateways due to reflect bug deep in msgpack. Described at bottom of https://github.com/TykTechnologies/tyk-sink/issues/26

Fixed by copying struct into rpc package and instantiating directly instead of using cast into interface{}

See #1974 for details

We should condider moving analytics.go into its own package also i think.

@dencoded
Copy link
Contributor Author

dencoded commented Nov 9, 2018

@joshblakeley moving analytics.go sounds good to me but it is not easy (tried it as part of this change and it didn't work at 1st)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants