func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
	if t.EnableServiceNameResolution {
		if err := resolveServiceName(req); err != nil {
			return nil, err
		}
	}
	idToken, err := IDToken(audFromRequest(req))
	if err != nil {
		return nil, err
	}
	req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", idToken))
	if t.Base == nil {
		t.Base = http.DefaultTransport
	}
	return t.Base.RoundTrip(req)
}
RoundTrip implements http.RoundTripper.
package run
import (
	"context"
	"fmt"
	"net"
	"net/http"
	"net/url"
	"os"
	"os/signal"
	"strings"
	"syscall"
)
var serviceCache *cache
func init() {
	data := make(map[string]string)
	serviceCache = &cache{data}
}
type Transport struct {
	Base http.RoundTripper
	EnableServiceNameResolution bool
}
func resolveServiceName(r *http.Request) error {
	var (
		serviceName string
		region      string
		project     string
	)
	parts := strings.Split(r.URL.Host, ".")
	switch n := len(parts); {
	case n > 1:
		return nil
	case n == 0:
		return nil
	case n == 1:
		serviceName = parts[0]
	}
	var u *url.URL
	endpoint := serviceCache.Get(serviceName)
	if endpoint == "" {
		service, err := getService(serviceName, region, project)
		if err != nil {
			return fmt.Errorf("run: error resolving service name: %w", err)
		}
		endpoint = service.Status.Address.URL
		serviceCache.Set(serviceName, endpoint)
	}
	u, err := url.Parse(endpoint)
	if err != nil {
		return err
	}
	r.Host = u.Host
	r.URL.Host = u.Host
	r.URL.Scheme = u.Scheme
	r.Header.Set("Host", u.Hostname())
	return nil
}