code: func (d *Deployment) update() error {
  	select {
  	case event, ok := <-d.events:
  		if !ok {
  			return fmt.Errorf("service stream closed unexpectedly: %s", d.stream.Err())
  		}
  		if event.Kind == discoverd.EventKindServiceMeta {
  			d.meta = event.ServiceMeta
  		}
  	default:
  	}
  	return nil
  }
docs: // update drains any pending events, updating the service metadata, it doesn't block.