• Jeff Mitchell's avatar
    Redo API locking (#3508) · 41568317
    Jeff Mitchell authored
    * Redo the API client quite a bit to make the behavior of NewClient more
    predictable and add locking to make it safer to use with Clone() and if
    multiple goroutines for some reason decide to change things.
    
    Along the way I discovered that currently, the x/net/http2 package is
    broke with the built-in h2 support in released Go. For those using
    DefaultConfig (the vast majority of cases) this will be a non-event.
    Others can manually call http2.ConfigureTransport as needed. We should
    keep an eye on commits on that repo and consider more updates before
    release. Alternately we could go back revisions but miss out on bug
    fixes; my theory is that this is not a purposeful break and I'll be
    following up on this in the Go issue tracker.
    
    In a few tests that don't use NewTestCluster, either for legacy or other
    reasons, ensure that http2.ConfigureTransport is called.
    
    * Use tls config cloning
    
    * Don't http2.ConfigureServer anymore as current Go seems to work properly without r...
    41568317