code: func (m *BaseShardManager) GetShard(
  	key string) (
  	shardId int,
  	conn net2.ManagedConn,
  	err error) {
  
  	m.rwMutex.RLock()
  	defer m.rwMutex.RUnlock()
  
  	shardId = m.getShardId(key, len(m.shardStates))
  	if shardId == -1 {
  		return
  	}
  
  	state := m.shardStates[shardId]
  	if state.State != ActiveServer {
  		m.logInfo("Memcache shard ", shardId, " is not in active state.")
  		connSkippedByAddr.Add(state.Address, 1)
  		return
  	}
  
  	entry := &ShardMapping{}
  	m.fillEntryWithConnection(state.Address, entry)
  	conn, err = entry.Connection, entry.ConnErr
  
  	return
  }
docs: // See ShardManager interface for documentation.