Documentation ¶
Overview ¶
Package commandconn provides a net.Conn implementation that can be used for proxying (or emulating) stream via a custom command.
For example, to provide an http.Client that can connect to a Docker daemon running in a Docker container ("DIND"):
httpClient := &http.Client{ Transport: &http.Transport{ DialContext: func(ctx context.Context, _network, _addr string) (net.Conn, error) { return commandconn.New(ctx, "docker", "exec", "-it", containerID, "docker", "system", "dial-stdio") }, }, }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.