Versions in this module Expand all Collapse all v1 v1.2.2 Jul 30, 2018 Changes in this version + func ConsulResolverFromAddrFunc(client *api.Client) func(addr string) (Resolver, error) v1.2.1 Jul 12, 2018 v1.2.0 Jun 25, 2018 Changes in this version + const ConsulResolverTypePreparedQuery + const ConsulResolverTypeService + func CertURIFromConn(conn net.Conn) (connect.CertURI, error) + func TestCAPool(t testing.T, cas ...*structs.CARoot) *x509.CertPool + func TestPeerCertificates(t testing.T, service string, ca *structs.CARoot) []*x509.Certificate + func TestSvcKeyPair(t testing.T, service string, ca *structs.CARoot) tls.Certificate + func TestTLSConfig(t testing.T, service string, ca *structs.CARoot) *tls.Config + type ConsulResolver struct + Client *api.Client + Datacenter string + Name string + Namespace string + Type int + func (cr *ConsulResolver) Resolve(ctx context.Context) (string, connect.CertURI, error) + type Resolver interface + Resolve func(ctx context.Context) (addr string, certURI connect.CertURI, err error) + type Service struct + func NewDevServiceFromCertFiles(serviceID string, logger *log.Logger, caFile, certFile, keyFile string) (*Service, error) + func NewDevServiceWithTLSConfig(serviceName string, logger *log.Logger, tlsCfg *tls.Config) (*Service, error) + func NewService(serviceName string, client *api.Client) (*Service, error) + func NewServiceWithLogger(serviceName string, client *api.Client, logger *log.Logger) (*Service, error) + func TestService(t testing.T, service string, ca *structs.CARoot) *Service + func (s *Service) Close() error + func (s *Service) Dial(ctx context.Context, resolver Resolver) (net.Conn, error) + func (s *Service) HTTPClient() *http.Client + func (s *Service) HTTPDialTLS(network, addr string) (net.Conn, error) + func (s *Service) Name() string + func (s *Service) Ready() bool + func (s *Service) ReadyWait() <-chan struct{} + func (s *Service) ServerTLSConfig() *tls.Config + type StaticResolver struct + Addr string + CertURI connect.CertURI + func (sr *StaticResolver) Resolve(ctx context.Context) (string, connect.CertURI, error) + type TestServer struct + Addr string + CA *structs.CARoot + Listening chan struct{} + Service string + TLSCfg *tls.Config + TimeoutHandshake bool + func NewTestServer(t testing.T, service string, ca *structs.CARoot) *TestServer + func (s *TestServer) Close() error + func (s *TestServer) Serve() error + func (s *TestServer) ServeHTTPS(h http.Handler) error