MCPcopy Index your code
hub / github.com/devspace-sh/devspace / NewClientConnection

Function NewClientConnection

helper/util/conn.go:13–23  ·  view source on GitHub ↗

NewClientConnection creates a new client connection for the given reader and writer

(reader io.Reader, writer io.Writer)

Source from the content-addressed store, hash-verified

11
12// NewClientConnection creates a new client connection for the given reader and writer
13func NewClientConnection(reader io.Reader, writer io.Writer) (*grpc.ClientConn, error) {
14 pipe := NewStdStreamJoint(reader, writer, false)
15
16 // Set up a connection to the server.
17 return grpc.NewClient("passthrough:///",
18 grpc.WithTransportCredentials(insecure.NewCredentials()),
19 grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) {
20 return pipe, nil
21 }),
22 grpc.WithLocalDNSResolution())
23}

Callers 5

newUpstreamFunction · 0.92
newDownstreamFunction · 0.92
StartReverseForwardFunction · 0.92
TestUpstreamServerFunction · 0.92
TestDownstreamServerFunction · 0.92

Calls 1

NewStdStreamJointFunction · 0.85

Tested by 2

TestUpstreamServerFunction · 0.74
TestDownstreamServerFunction · 0.74