Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 82 for Chan (0.31 sec)

  1. cni/pkg/nodeagent/ztunnelserver.go

    }
    
    type updateRequest struct {
    	Update []byte
    	Fd     *int
    
    	Resp chan updateResponse
    }
    
    type ZtunnelConnection struct {
    	u       *net.UnixConn
    	Updates chan updateRequest
    }
    
    func newZtunnelConnection(u *net.UnixConn) *ZtunnelConnection {
    	return &ZtunnelConnection{u: u, Updates: make(chan updateRequest, 100)}
    }
    
    func (z *ZtunnelConnection) Close() {
    	z.u.Close()
    }
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  2. cni/pkg/log/uds.go

    	}
    	l.loggingServer = loggingServer
    	return l
    }
    
    // StartUDSLogServer starts up a UDS server which receives log reported from CNI network plugin.
    func (l *UDSLogger) StartUDSLogServer(sockAddress string, stop <-chan struct{}) error {
    	if sockAddress == "" {
    		return nil
    	}
    	log.Info("Start a UDS server for CNI plugin logs")
    	unixListener, err := uds.NewListener(sockAddress)
    	if err != nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Nov 29 01:05:12 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/server_test.go

    type WaitGroup struct {
    	count int32
    	done  chan struct{}
    }
    
    func NewWaitGroup() *WaitGroup {
    	return &WaitGroup{
    		done: make(chan struct{}),
    	}
    }
    
    func NewWaitForNCalls(t *testing.T, n int32) (*WaitGroup, func()) {
    	wg := &WaitGroup{
    		done: make(chan struct{}),
    	}
    
    	wg.Add(n)
    	return wg, func() {
    		select {
    		case <-wg.C():
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  4. istioctl/pkg/dashboard/dashboard.go

    				}
    
    				if len(pl.Items) < 1 {
    					return errors.New("no pods found")
    				}
    
    				if len(pl.Items) > 1 {
    					log.Warnf("more than 1 pods fits selector: %s; will use pod: %s", labelSelector, pl.Items[0].Name)
    				}
    
    				// only use the first pod in the list
    				podName = pl.Items[0].Name
    				ns = pl.Items[0].Namespace
    			} else {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Apr 15 01:29:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
  5. cni/pkg/util/pluginutil.go

    	"encoding/json"
    	"fmt"
    	"os"
    
    	"github.com/fsnotify/fsnotify"
    
    	"istio.io/istio/pkg/file"
    	"istio.io/istio/pkg/log"
    )
    
    type Watcher struct {
    	watcher *fsnotify.Watcher
    	Events  chan struct{}
    	Errors  chan error
    }
    
    // Waits until a file is modified (returns nil), the context is cancelled (returns context error), or returns error
    func (w *Watcher) Wait(ctx context.Context) error {
    	select {
    	case <-w.Events:
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  6. cni/pkg/nodeagent/ztunnelserver_test.go

    	if sent == nil {
    		panic("expected snapshot sent")
    	}
    	sendAck(ztunClient)
    
    	// now remove the pod
    	ztunnelServer := fixture.ztunServer
    	errChan := make(chan error)
    	go func() {
    		errChan <- ztunnelServer.PodDeleted(ctx, uid)
    	}()
    	// read the msg to delete from ztunnel
    	m, fds = readRequest(t, ztunClient)
    	assert.Equal(t, len(fds), 0)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  7. istioctl/pkg/cli/mock_client.go

    	return nil
    }
    
    func (m MockPortForwarder) Address() string {
    	return "localhost:3456"
    }
    
    func (m MockPortForwarder) Close() {
    }
    
    func (m MockPortForwarder) ErrChan() <-chan error {
    	return make(chan error)
    }
    
    func (m MockPortForwarder) WaitForStop() {
    }
    
    var _ kube.PortForwarder = MockPortForwarder{}
    
    type MockClient struct {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Mar 08 08:38:19 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  8. cni/pkg/install/install_test.go

    				t.Fatal(err)
    			}
    
    			// Listen for isReady to be set to true
    			ticker := time.NewTicker(500 * time.Millisecond)
    			defer ticker.Stop()
    			readyChan := make(chan bool)
    			go func(ctx context.Context, tick <-chan time.Time) {
    				for {
    					select {
    					case <-ctx.Done():
    						return
    					case <-tick:
    						if isReady.Load().(bool) {
    							readyChan <- true
    						}
    					}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 11.1K bytes
    - Viewed (0)
  9. istioctl/pkg/wait/wait.go

    	})
    	return g
    }
    
    type watcher struct {
    	resultsChan chan string
    	errorChan   chan error
    	ctx         context.Context
    }
    
    func withContext(ctx context.Context) *watcher {
    	return &watcher{
    		resultsChan: make(chan string, 1),
    		errorChan:   make(chan error, 1),
    		ctx:         ctx,
    	}
    }
    
    func (w *watcher) Go(f func(chan string) error) {
    	go func() {
    		if err := f(w.resultsChan); err != nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Feb 17 12:24:17 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  10. cni/pkg/log/uds_test.go

    	udsSockDir := t.TempDir()
    	udsSock := filepath.Join(udsSockDir, "cni.sock")
    	logger := NewUDSLogger()
    	pluginLog.SetOutputLevel(log.DebugLevel) // this will be configured by global.logging.level
    	stop := make(chan struct{})
    	defer close(stop)
    	assert.NoError(t, logger.StartUDSLogServer(udsSock, stop))
    
    	// Configure log to tee to UDS server
    	stdout := os.Stdout
    	r, w, _ := os.Pipe()
    	os.Stdout = w
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Mar 16 00:20:01 GMT 2024
    - 2.5K bytes
    - Viewed (0)
Back to top