Add wrapper implementation
This commit is contained in:
@@ -12,6 +12,7 @@ type options struct {
|
||||
broker broker.Broker
|
||||
registry registry.Registry
|
||||
transport transport.Transport
|
||||
wrappers []Wrapper
|
||||
}
|
||||
|
||||
// Broker to be used for pub/sub
|
||||
@@ -48,3 +49,10 @@ func Transport(t transport.Transport) Option {
|
||||
o.transport = t
|
||||
}
|
||||
}
|
||||
|
||||
// Adds a Wrapper to a list of options passed into the client
|
||||
func Wrap(w Wrapper) Option {
|
||||
return func(o *options) {
|
||||
o.wrappers = append(o.wrappers, w)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user