MCPcopy
hub / github.com/etcd-io/etcd / setupClient

Function setupClient

tests/integration/grpc_test.go:129–140  ·  view source on GitHub ↗
(t *testing.T, endpointPattern string, clus *integration.Cluster, tlsConfig *tls.Config)

Source from the content-addressed store, hash-verified

127}
128
129func setupClient(t *testing.T, endpointPattern string, clus *integration.Cluster, tlsConfig *tls.Config) *clientv3.Client {
130 t.Helper()
131 endpoints := templateEndpoints(t, endpointPattern, clus)
132 kv, err := clientv3.New(clientv3.Config{
133 Endpoints: endpoints,
134 DialTimeout: 5 * time.Second,
135 DialOptions: []grpc.DialOption{grpc.WithBlock()},
136 TLS: tlsConfig,
137 })
138 require.NoError(t, err)
139 return kv
140}
141
142func templateEndpoints(t *testing.T, pattern string, clus *integration.Cluster) []string {
143 t.Helper()

Callers 1

TestAuthorityFunction · 0.85

Calls 2

templateEndpointsFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…