MCPcopy
hub / github.com/grafana/dskit / Write

Method Write

server/server_test.go:900–909  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

898}
899
900func (pc *proxyProtocolConn) Write(b []byte) (int, error) {
901 if !pc.proxyHeaderWritten {
902 _, err := pc.Conn.Write(pc.proxyHeader)
903 if err != nil {
904 return 0, err
905 }
906 pc.proxyHeaderWritten = true
907 }
908 return pc.Conn.Write(b)
909}
910
911func proxyDialer(proxyHeader string) func(context.Context, string, string) (net.Conn, error) {
912 return func(_ context.Context, network string, addr string) (net.Conn, error) {

Callers 5

TestTLSServerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected