code: func (s *Service) Events(ctx context.Context, evts chan events.ContainerEvent) error {
  	filter := filters.NewArgs()
  	filter.Add("label", fmt.Sprintf("%s=%s", labels.PROJECT, s.project.Name))
  	filter.Add("label", fmt.Sprintf("%s=%s", labels.SERVICE, s.name))
  	client := s.clientFactory.Create(s)
  	eventq, errq := client.Events(ctx, types.EventsOptions{
  		Filters: filter,
  	})
  	go func() {
  		for {
  			select {
  			case event := <-eventq:
  				service := event.Actor.Attributes[labels.SERVICE.Str()]
  				attributes := map[string]string{}
  				for _, attr := range eventAttributes {
  					attributes[attr] = event.Actor.Attributes[attr]
  				}
  				e := events.ContainerEvent{
  					Service:    service,
  					Event:      event.Action,
  					Type:       event.Type,
  					ID:         event.Actor.ID,
  					Time:       time.Unix(event.Time, 0),
  					Attributes: attributes,
  				}
  				evts <- e
  			}
  		}
  	}()
  	return <-errq
  }
docs: // Events implements Service.Events. It listen to all real-time events happening
  // for the service, and put them into the specified chan.