code: func (p *LogsPump) Route(route *Route, logstream chan *Message) {
  	p.mu.Lock()
  	for _, pump := range p.pumps {
  		if route.MatchContainer(
  			normalID(pump.container.ID),
  			normalName(pump.container.Name),
  			pump.container.Config.Labels) {
  
  			pump.add(logstream, route)
  			defer pump.remove(logstream)
  		}
  	}
  	updates := make(chan *update)
  	p.routes[updates] = struct{}{}
  	p.mu.Unlock()
  	defer func() {
  		p.mu.Lock()
  		delete(p.routes, updates)
  		p.mu.Unlock()
  		route.closed = true
  	}()
  	for {
  		select {
  		case event := <-updates:
  			switch event.Status {
  			case "start", "restart":
  				if route.MatchContainer(
  					normalID(event.pump.container.ID),
  					normalName(event.pump.container.Name),
  					event.pump.container.Config.Labels) {
  
  					event.pump.add(logstream, route)
  					defer event.pump.remove(logstream)
  				}
  			case "die":
  				if strings.HasPrefix(route.FilterID, event.ID) {
  					// If the route is just about a single container,
  					// we can stop routing when it dies.
  					return
  				}
  			}
  		case <-route.Closer():
  			return
  		}
  	}
  }
docs: // Route takes a logstream and routes it according to the supplied Route