Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 129 for dialFn (0.3 sec)

  1. pkg/hbone/dialer.go

    	return nil
    }
    
    // TLSDialWithDialer is an implementation of tls.DialWithDialer that accepts a generic Dialer
    func TLSDialWithDialer(dialer Dialer, network, addr string, config *tls.Config) (*tls.Conn, error) {
    	return tlsDial(context.Background(), dialer, network, addr, config)
    }
    
    func tlsDial(ctx context.Context, netDialer Dialer, network, addr string, config *tls.Config) (*tls.Conn, error) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 15:56:41 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  2. pkg/test/echo/common/dialer.go

    		return client.Do(req)
    	}
    	// DefaultTCPDialFunc just calls dialer.Dial, with no alterations to the arguments.
    	DefaultTCPDialFunc = func(dialer net.Dialer, ctx context.Context, address string) (net.Conn, error) {
    		return dialer.DialContext(ctx, "tcp", address)
    	}
    	// DefaultDialer is provides defaults for all dial functions.
    	DefaultDialer = Dialer{
    		GRPC:      DefaultGRPCDialFunc,
    		Websocket: DefaultWebsocketDialFunc,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Aug 07 15:55:42 UTC 2020
    - 3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/proxy/dial.go

    	dialAddr := netutil.CanonicalAddr(url)
    
    	dialer, err := utilnet.DialerFor(transport)
    	if err != nil {
    		klog.V(5).Infof("Unable to unwrap transport %T to get dialer: %v", transport, err)
    	}
    
    	switch url.Scheme {
    	case "http":
    		if dialer != nil {
    			return dialer(ctx, "tcp", dialAddr)
    		}
    		var d net.Dialer
    		return d.DialContext(ctx, "tcp", dialAddr)
    	case "https":
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 23 22:33:38 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  4. pkg/kubelet/apis/podresources/client.go

    	addr, dialer, err := util.GetAddressAndDialer(socket)
    	if err != nil {
    		return nil, nil, err
    	}
    	ctx, cancel := context.WithTimeout(context.Background(), connectionTimeout)
    	defer cancel()
    
    	conn, err := grpc.DialContext(ctx, addr,
    		grpc.WithTransportCredentials(insecure.NewCredentials()),
    		grpc.WithContextDialer(dialer),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 08:58:18 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. src/net/net_fake_test.go

    		if err != nil {
    			t.Fatalf("unexpected error from Dial with %v connections: %v", len(dialed), err)
    		}
    		dialed = append(dialed, c)
    		if testing.Verbose() && len(dialed)%(1<<12) == 0 {
    			t.Logf("dialed %d connections", len(dialed))
    		}
    	}
    	t.Logf("dialed %d connections", len(dialed))
    
    	// Now that all of the ports are in use, dialing another should fail due
    	// to port exhaustion, which (for POSIX-like socket APIs) should return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  6. pkg/kubelet/pluginmanager/pluginwatcher/example_handler.go

    	p.m.Lock()
    	defer p.m.Unlock()
    
    	v, ok := p.ExpectedNames[pluginName]
    	if !ok {
    		v = -1
    	}
    
    	return v, ok
    }
    
    // Dial establishes the gRPC communication with the picked up plugin socket. https://godoc.org/google.golang.org/grpc#Dial
    func dial(unixSocketPath string, timeout time.Duration) (registerapi.RegistrationClient, *grpc.ClientConn, error) {
    	ctx, cancel := context.WithTimeout(context.Background(), timeout)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 16 12:00:49 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  7. src/net/tcpconn_keepalive_test.go

    			KeepAliveConfig: cfg})
    		ls := (&streamListener{Listener: ln}).newLocalServer()
    		defer ls.teardown()
    		if err := ls.buildup(handler); err != nil {
    			t.Fatal(err)
    		}
    		d := Dialer{KeepAlive: -1} // prevent calling hook from dialing
    		c, err := d.Dial("tcp", ls.Listener.Addr().String())
    		if err != nil {
    			t.Fatal(err)
    		}
    		defer c.Close()
    
    		cc := <-ch
    		defer cc.Close()
    		if errHook != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  8. src/net/http/transport_dial_test.go

    }
    
    // wantDial waits for the Transport to start a Dial.
    func (dt *transportDialTester) wantDial() *transportDialTesterConn {
    	c := <-dt.dials
    	c.connID = dt.dialCount
    	dt.dialCount++
    	dt.t.Logf("Dial %v: started", c.connID)
    	return c
    }
    
    // finish completes a Dial.
    func (c *transportDialTesterConn) finish(err error) {
    	c.t.Logf("Dial %v: finished (err:%v)", c.connID, err)
    	c.ready <- err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  9. src/net/iprawsock_posix.go

    }
    
    func (sd *sysDialer) dialIP(ctx context.Context, laddr, raddr *IPAddr) (*IPConn, error) {
    	network, proto, err := parseNetwork(ctx, sd.network, true)
    	if err != nil {
    		return nil, err
    	}
    	switch network {
    	case "ip", "ip4", "ip6":
    	default:
    		return nil, UnknownNetworkError(sd.network)
    	}
    	ctrlCtxFn := sd.Dialer.ControlContext
    	if ctrlCtxFn == nil && sd.Dialer.Control != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  10. pkg/test/echo/server/forwarder/websocket.go

    		return newDialer(cfg).Dial(network, addr)
    	}
    	if len(cfg.UDS) > 0 {
    		dialContext = func(network, addr string) (net.Conn, error) {
    			return newDialer(cfg).Dial("unix", cfg.UDS)
    		}
    	}
    
    	dialer := &websocket.Dialer{
    		TLSClientConfig:  cfg.tlsConfig,
    		NetDial:          dialContext,
    		HandshakeTimeout: cfg.timeout,
    	}
    
    	conn, _, err := dialer.Dial(req.Url, wsReq)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 11 16:27:16 UTC 2022
    - 3.3K bytes
    - Viewed (0)
Back to top