Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for RegisterHasSyncedHandler (0.16 sec)

  1. pilot/pkg/config/memory/controller_test.go

    	mock.CheckCacheSync(store, ctl, TestNamespace, 5, t)
    }
    
    func TestControllerHashSynced(t *testing.T) {
    	store := memory.Make(collections.Mocks)
    	var v int32
    	ctl := memory.NewController(store)
    
    	ctl.RegisterHasSyncedHandler(func() bool {
    		return atomic.LoadInt32(&v) > 0
    	})
    
    	if ctl.HasSynced() {
    		t.Error("has synced but should not")
    	}
    	atomic.StoreInt32(&v, 1)
    	if !ctl.HasSynced() {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 18 15:37:45 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  2. pilot/pkg/config/memory/controller.go

    func NewSyncController(cs model.ConfigStore) *Controller {
    	out := &Controller{
    		configStore: cs,
    		monitor:     NewSyncMonitor(cs),
    	}
    
    	return out
    }
    
    func (c *Controller) RegisterHasSyncedHandler(cb func() bool) {
    	c.hasSynced = cb
    }
    
    func (c *Controller) RegisterEventHandler(kind config.GroupVersionKind, f model.EventHandler) {
    	c.monitor.AppendEventHandler(kind, f)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 26 13:54:32 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. pilot/pkg/bootstrap/configcontroller.go

    			}
    			store := memory.Make(collections.Pilot)
    			// TODO: enable namespace filter for memory controller
    			configController := memory.NewController(store)
    			configController.RegisterHasSyncedHandler(xdsMCP.HasSynced)
    			xdsMCP.Store = configController
    			err = xdsMCP.Run()
    			if err != nil {
    				return fmt.Errorf("MCP: failed running %v", err)
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 14.1K bytes
    - Viewed (0)
Back to top