// Utility method to cleanup state for tests
Utility method to cleanup state for tests
// Utility method to cleanup state for tests
func (b *FusisBalancer) cleanup() error {
	b.flushVips()
	if out, err := exec.Command("ipvsadm", "--clear").CombinedOutput(); err != nil {
		log.Fatal(fmt.Errorf("Running ipvsadm --clear failed with message: `%s`, error: %v", strings.TrimSpace(string(out)), err))
	}
	return nil
}
func ( b * FusisBalancer ) cleanup ( ) error { b . flushVips ( ) if out , err := exec . Command ( " " , " " ) . CombinedOutput ( ) ; err != nil { log . Fatal ( fmt . Errorf ( " " , strings . TrimSpace ( string ( out ) ) , err ) ) } return nil }
Utility method to cleanup state for tests
Utility method to cleanup state for tests