add WrapCall option at top level

This commit is contained in:
Asim Aslam 2016-12-06 17:01:53 +00:00
parent bee9f03e11
commit e10259940b

View File

@ -161,6 +161,13 @@ func WrapClient(w ...client.Wrapper) Option {
} }
} }
// WrapCall is a convenience method for wrapping a Client CallFunc
func WrapCall(w ...client.CallWrapper) Option {
return func(o *Options) {
o.Client.Init(client.WrapCall(w...))
}
}
// WrapHandler adds a handler Wrapper to a list of options passed into the server // WrapHandler adds a handler Wrapper to a list of options passed into the server
func WrapHandler(w ...server.HandlerWrapper) Option { func WrapHandler(w ...server.HandlerWrapper) Option {
return func(o *Options) { return func(o *Options) {