Use config for pubsub tracing

This commit is contained in:
Łukasz Magiera
2019-11-20 21:31:00 +01:00
parent 3a8100fd3c
commit c7c422abbd
4 changed files with 32 additions and 16 deletions
+6
View File
@@ -40,6 +40,12 @@ func ApplyIf(check func(s *Settings) bool, opts ...Option) Option {
}
}
func If(b bool, opts ...Option) Option {
return ApplyIf(func(s *Settings) bool {
return b
}, opts...)
}
// Override option changes constructor for a given type
func Override(typ, constructor interface{}) Option {
return func(s *Settings) error {