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)
		}
	}
}
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)
		}
	}
}
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 , " " , " " ) ) . Log ( " " , err ) } } }
// 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.
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 .