func (this *CompositeReaderBuilder) RegisterMultiple(prefix string, instances ...interface{}) *CompositeReaderBuilder { discovery := messaging.NewReflectionDiscovery(prefix) for _, instance := range instances { if discovered, err := discovery.Discover(instance); err != nil { log.Fatal("Unable to discover type for instance", instance) } else { this.types[discovered] = reflect.TypeOf(instance) this.addBinding(discovered) } } return this }
func (this *CompositeWriterBuilder) PrefixTypesWith(prefix string) *CompositeWriterBuilder { this.discovery = messaging.NewReflectionDiscovery(prefix) return this }