code: func (p *pool) Get(hostname string, caCert, tlsCert, tlsKey []byte) (as.ApplicationServerServiceClient, error) {
  	defer p.Unlock()
  	p.Lock()
  
  	var connect bool
  	c, ok := p.clients[hostname]
  	if !ok {
  		connect = true
  	}
  
  	// if the connection exists in the map, but when the certificates changed
  	// try to close the connection and re-connect
  	if ok && (!bytes.Equal(c.caCert, caCert) || !bytes.Equal(c.tlsCert, tlsCert) || !bytes.Equal(c.tlsKey, tlsKey)) {
  		c.clientConn.Close()
  		delete(p.clients, hostname)
  		connect = true
  	}
  
  	if connect {
  		clientConn, asClient, err := p.createClient(hostname, caCert, tlsCert, tlsKey)
  		if err != nil {
  			return nil, errors.Wrap(err, "create application-server api client error")
  		}
  		c = client{
  			client:     asClient,
  			clientConn: clientConn,
  			caCert:     caCert,
  			tlsCert:    tlsCert,
  			tlsKey:     tlsKey,
  		}
  		p.clients[hostname] = c
  	}
  
  	return c.client, nil
  }
docs: // Get Returns an ApplicationServerClient for the given server (hostname:ip).