code: func (a *Adapter) refreshTargetGroups(allTargetGroups map[string][]*targetgroup.Group) {
  	tempGroups := generateTargetGroups(allTargetGroups)
  
  	if !reflect.DeepEqual(a.groups, tempGroups) {
  		a.groups = tempGroups
  		err := a.writeOutput()
  		if err != nil {
  			level.Error(log.With(a.logger, "component", "sd-adapter")).Log("err", err)
  		}
  	}
  }
docs: // Parses incoming target groups updates. If the update contains changes to the target groups
  // Adapter already knows about, or new target groups, we Marshal to JSON and write to file.