Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 77 for Chan (0.17 sec)

  1. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 11.1K bytes
    - Viewed (0)
  2. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 17 12:24:17 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  3. cni/cmd/install-cni/main.go

    	"istio.io/istio/pkg/log"
    )
    
    func main() {
    	// Create context that cancels on termination signal
    	ctx, cancel := context.WithCancel(context.Background())
    	sigChan := make(chan os.Signal, 1)
    	signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
    	go func(sigChan chan os.Signal, cancel context.CancelFunc) {
    		sig := <-sigChan
    		log.Infof("Exit signal received: %s", sig)
    		cancel()
    	}(sigChan, cancel)
    
    	rootCmd := cmd.GetCommand()
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue May 23 17:08:31 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  4. cni/pkg/repair/repaircontroller.go

    		controllers.WithReconciler(c.Reconcile),
    		controllers.WithMaxAttempts(5))
    	c.pods.AddEventHandler(controllers.ObjectHandler(c.queue.AddObject))
    
    	return c, nil
    }
    
    func (c *Controller) Run(stop <-chan struct{}) {
    	kube.WaitForCacheSync("repair controller", stop, c.pods.HasSynced)
    	c.queue.Run(stop)
    	c.pods.ShutdownHandlers()
    }
    
    func (c *Controller) Reconcile(key types.NamespacedName) error {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 10.4K bytes
    - Viewed (0)
  5. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  6. istioctl/pkg/tag/tag.go

    		Long: `Command group used to interact with revision tags. Revision tags allow for the creation of mutable aliases
    referring to control plane revisions for sidecar injection.
    
    With revision tags, rather than relabeling a namespace from "istio.io/rev=revision-a" to "istio.io/rev=revision-b" to
    change which control plane revision handles injection, it's possible to create a revision tag "prod" and label our
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Tue Apr 02 08:32:06 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  7. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Wed Nov 29 01:05:12 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  8. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  9. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  10. 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 Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Apr 15 01:29:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
Back to top