jonmorehouse / gatekeeper

a pluggable http routing runtime
12 stars 1 forks source link

application structure: finishing out remaining features for v1 #21

Closed jonmorehouse closed 8 years ago

jonmorehouse commented 8 years ago

Specifically, this PR represents the following bodies of work:

Going to let this marinate a while more before merging and will keep adding more code here.

jonmorehouse commented 8 years ago

So following up on this one, it seems like for the most part we are close to having this fully functional.

However ... alot of the plugins have been structured to send error interfaces over the wire which is a no-bueno. Because of the way that the gob package serializes data to be sent over uds, if a concrete type underneath an error interface isn't "gob friendly" it'll cause runtime errors.

For instance, the fmt.Errorf error uses errors.New underneath the hood and unfortunately that type doesn't expose public implementations to be serialized by the gob package.

It seems like we're going to need to rewire all of the plugin interfaces so as ensure that we are passing concrete plugins back and forth. I'm not entirely sure of what repercussions this might have, but thus far, it seems that only the Manager interface and the plugins themselves would have to change.