Hi Michal, here's some comments:
Why not a break here after true is set? https://github.com/mkorman9/ff/blob/release/clustering.go#L208
I had to resort to grep to find where Parameters was defined (context.go).
Instead of:
type RemoteEventEndpoint struct {
clusterMember *ClusterMember
context Context
}
You could do:
type RemoteEventEndpoint struct {
*ClusterMember
Context
}
In the case of a mutex it would make your locking cleaner (holder.Lock() instead of holder.mutex.Lock()). This struct embedding pattern would reduce many of your function calls.
I’ve been making the case to have a type for use of interface{} like this:
type ClusterConnectionPool interface {
ResolveConnection(target interface{}) error
}
Where target would be a specific "type YourName interface{}" that hints at how it will be used.
Instead of "type JsonCodec struct{}" I’d just have functions. You may be doing this for interface adherence and maybe that makes sense but it could also just be too much abstraction.
The standard library HTTP server and router are pretty good, are you sure you’re adding value by having a wrapper? Just a thought, I don’t know the answer.
Are you sure about linking runtime/pprof and runtime/trace into all of your users' servers? My thought is they have no effect unless triggered, but I could be wrong.
iota only has to be defined on the first item (https://github.com/mkorman9/ff/blob/release/plugins.go#L5).
I’ve put in fun names like PoisonPill before but recently I’ve preferred a name more directly describing functionality.
Your godoc is longer than usual: https://godoc.org/github.com/mkorman9/ff