func (self *DataRPCClient) Connect() error { var err error self.lock.Lock() defer self.lock.Unlock() if self.conn == nil { self.conn, err = rpc.DialHTTP("tcp", config.DataServerAddr(self.index)) } return err }
func (self *DataServer) addr() string { return config.DataServerAddr(int(self.location)) }