```go
for event := range events {
  var address string
  if event.Event == "start" {
    address = getAddr(hostClient, jobid)
  }
  addr <- address
}
```