Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Enables plugin communication over gRPC #1012

Merged
merged 14 commits into from
Jun 23, 2016

Conversation

IRCody
Copy link
Contributor

@IRCody IRCody commented Jun 21, 2016

Working towards #965.

Summary of changes:

  • Adds the ability to use grpc plugin.RPCType as GRPC, which will cause communication with the plugin to be done over grpc.
  • Adds a general plugin grpc service that handles common functions like ping, kill, getConfigPolicy.
  • Adds a collection grpc service with server/client to handle communication of plugin and snapd over grpc.
  • Adds stubbed out process/publish proxy's.

Testing done:

  • make test-{legacy,small}
  • manual testing by changing mock-collector's plugin.RPCType to plugin.GRPC and verifying that tasks still work as expected and that the code path is going through grpc.

I tried separating out the changes into more discrete commits to (hopefully) make it easier to review. Happy to change/rebase/re-order things if someone has a better way.

@intelsdi-x/snap-maintainers


// NewCollectorGrpcClient returns a collector gRPC Client.
func NewCollectorGrpcClient(address string, timeout time.Duration, pub *rsa.PublicKey, secure bool) (PluginCollectorClient, error) {
stuff := strings.Split(address, ":")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stuff?

@IRCody IRCody force-pushed the enable_grpc_plugin_collector branch 2 times, most recently from f97a2be to 9cd65c8 Compare June 23, 2016 23:06
@IRCody IRCody force-pushed the enable_grpc_plugin_collector branch from 9cd65c8 to bd20dfb Compare June 23, 2016 23:11
@pittma
Copy link
Contributor

pittma commented Jun 23, 2016

LGTM

@pittma pittma changed the title Enable collection over grpc Enables plugin communication over gRPC Jun 23, 2016
@pittma pittma merged commit 8539f5a into intelsdi-x:master Jun 23, 2016
@geauxvirtual geauxvirtual mentioned this pull request Jun 27, 2016
@IRCody IRCody deleted the enable_grpc_plugin_collector branch October 11, 2016 17:35
@jcooklin jcooklin mentioned this pull request Nov 14, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants