jonmorehouse / gatekeeper

a pluggable http routing runtime
12 stars 1 forks source link

plugins: scaffolding + upstream plugin package #7

Closed jonmorehouse closed 8 years ago

jonmorehouse commented 8 years ago

Here, we introduce the scaffolding around using go-plugin for upstream to

Notably, there are a few things left I'd like to do...

1.) Finish out the UpstreamManager type in the gatekeeper package. 2.) Build out internalUpstream and internalBackend types in gatekeeper package 3.) Evaluate what needs to be private and what needs to be public in the plugin/upstream package. 4.) Update makefile and build scripts to properly symlink the plugin packages 5.) Pass all options to the configure block in the plugin?

A few questions I still need to answer:

1. does the plugin/<plugin-type> package structure make sense / work? I found it a little awkward naming some things in the `upstream

2. how does an upstream.Upstream relate to an internalUpstream in the gatekeepr package? This needs to be a concrete type in upstream plugin package because a.) we need a concrete type to send over the wire and b.) we need to make sure that we don't have circular dependencies (I think a more natural place would've been to place it in the gatekeeper library, but nonetheless...

3. how does the plugin interface feel?!? Could it be simpler, possibly?

jonmorehouse commented 8 years ago

So this is hacky but it works end to end. Specifically here are the next steps: