(num int)
| 50 | ) |
| 51 | |
| 52 | func newTestBackend(num int) *seesaw.Backend { |
| 53 | last := strconv.Itoa(num + 9) |
| 54 | return &seesaw.Backend{ |
| 55 | Host: seesaw.Host{ |
| 56 | Hostname: fmt.Sprintf("dns1-%d.example.com", num), |
| 57 | IPv4Addr: net.ParseIP("1.1.1." + last), |
| 58 | IPv6Addr: net.ParseIP("2012::" + last), |
| 59 | }, |
| 60 | Enabled: true, |
| 61 | InService: true, |
| 62 | Weight: int32(num), |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | var ( |
| 67 | backend1 = newTestBackend(1) |