INNER CODE UNIT · Go
func
go-kratos/gateway · client/node.go:137
func (s *HTTPSClientStore) GetClient(name string) *http.Client {
if name == "" {
return _globalClient
}
client, ok := s.clients[name]
if ok {
return client
}
tlsConfig, ok := s.clientConfigs[name]
if !ok {
LOG.Warnf("tls config not found for %s, using default instead", name)
return _globalHTTPSClient
}
client = createHTTPSClient(tlsConfig)
s.clients[name] = client
return client
}