Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for newBitset (0.12 sec)

  1. src/cmd/compile/internal/ssa/poset.go

    // and mark as part of the paths any node that has a children which is already
    // part of the path (or is dst itself).
    func (po *poset) findpaths(cur, dst uint32) bitset {
    	seen := newBitset(int(po.lastidx + 1))
    	path := newBitset(int(po.lastidx + 1))
    	path.Set(dst)
    	po.findpaths1(cur, dst, seen, path)
    	return path
    }
    
    func (po *poset) findpaths1(cur, dst uint32, seen bitset, path bitset) {
    	if cur == dst {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 04 17:23:05 UTC 2023
    - 37.2K bytes
    - Viewed (0)
  2. plugin/pkg/auth/authorizer/node/intset.go

    limitations under the License.
    */
    
    package node
    
    // intSet maintains a map of id to refcounts
    type intSet struct {
    	// members is a map of id to refcounts
    	members map[int]int
    }
    
    func newIntSet() *intSet {
    	return &intSet{members: map[int]int{}}
    }
    
    // has returns true if the specified id has a positive refcount.
    // it is safe to call concurrently, but must not be called concurrently with any of the other methods.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 10 18:24:13 UTC 2020
    - 1.6K bytes
    - Viewed (0)
  3. plugin/pkg/auth/authorizer/node/intset_test.go

    limitations under the License.
    */
    
    package node
    
    import (
    	"testing"
    
    	"github.com/stretchr/testify/assert"
    )
    
    func TestIntSet(t *testing.T) {
    	i := newIntSet()
    
    	assert.False(t, i.has(1))
    	assert.False(t, i.has(2))
    	assert.False(t, i.has(3))
    	assert.False(t, i.has(4))
    
    	i.reset()
    	i.increment(1) // to 1
    	i.increment(2) // to 1
    
    	assert.True(t, i.has(1))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 10 18:24:13 UTC 2020
    - 1.5K bytes
    - Viewed (0)
  4. pkg/proxy/ipvs/ipset.go

    	// activeEntries is the current active entries of the ipset.
    	activeEntries sets.Set[string]
    	// handle is the util ipset interface handle.
    	handle utilipset.Interface
    }
    
    // NewIPSet initialize a new IPSet struct
    func NewIPSet(handle utilipset.Interface, name string, setType utilipset.Type, isIPv6 bool, comment string) *IPSet {
    	hashFamily := utilipset.ProtocolFamilyIPV4
    	if isIPv6 {
    		hashFamily = utilipset.ProtocolFamilyIPV6
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  5. cni/pkg/ipset/ipset.go

    // doesn't support creating `list:set` types yet (is in main branch tho).
    // So this will actually create 2 underlying ipsets, one for v4 and one for v6
    func NewIPSet(name string, v6 bool, deps NetlinkIpsetDeps) (IPSet, error) {
    	var err error
    	set := IPSet{
    		V4Name: fmt.Sprintf(V4Name, name),
    		Deps:   deps,
    		Prefix: name,
    	}
    	err = deps.ipsetIPHashCreate(set.V4Name, false)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 22:24:38 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  6. pkg/proxy/ipvs/ipset_test.go

    			expectedEntries: []string{"FE80::0202:B3FF:FE1E:8329,sctp:80"},
    		},
    	}
    
    	for _, testCase := range testCases {
    		t.Run(testCase.name, func(t *testing.T) {
    			set := NewIPSet(fakeipset.NewFake(testIPSetVersion), testCase.set.Name, testCase.setType, testCase.ipv6, "comment-"+testCase.set.Name)
    
    			if err := set.handle.CreateSet(&set.IPSet, true); err != nil {
    				t.Errorf("Unexpected error: %v", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 19 01:20:51 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  7. cni/pkg/nodeagent/server.go

    //
    // We will unconditionally flush our set before use here, so it shouldn't matter.
    func createHostsideProbeIpset(isV6 bool) (ipset.IPSet, error) {
    	linDeps := ipset.RealNlDeps()
    	probeSet, err := ipset.NewIPSet(iptables.ProbeIPSet, isV6, linDeps)
    	if err != nil {
    		return probeSet, err
    	}
    	probeSet.Flush()
    	return probeSet, nil
    }
    
    func (s *Server) Start() {
    	log.Info("CNI ambient server starting")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 21:45:18 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  8. plugin/pkg/auth/authorizer/node/graph.go

    	if edgeCount < g.destinationEdgeThreshold {
    		delete(g.destinationEdgeIndex, n.ID())
    		return
    	}
    
    	// get or create the index
    	index := g.destinationEdgeIndex[n.ID()]
    	if index == nil {
    		index = newIntSet()
    	} else {
    		index.reset()
    	}
    
    	// populate the index
    	g.graph.VisitFrom(n, func(dest graph.Node) bool {
    		if destinationEdge, ok := g.graph.EdgeBetween(n, dest).(*destinationEdge); ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:22:55 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  9. pkg/kubelet/pod_workers_test.go

    			if reflect.DeepEqual(possible, syncPodRecords) {
    				match = true
    				break
    			}
    		}
    		if !match {
    			t.Fatalf("unexpected history for pod %v: %#v", i, syncPodRecords)
    		}
    	}
    }
    
    func newUIDSet(uids ...types.UID) sets.Set[string] {
    	set := sets.New[string]()
    	for _, uid := range uids {
    		set.Insert(string(uid))
    	}
    	return set
    }
    
    type terminalPhaseSync struct {
    	lock     sync.Mutex
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 75.6K bytes
    - Viewed (0)
  10. pkg/proxy/ipvs/proxier.go

    		logger:                logger,
    	}
    	// initialize ipsetList with all sets we needed
    	proxier.ipsetList = make(map[string]*IPSet)
    	for _, is := range ipsetInfo {
    		proxier.ipsetList[is.name] = NewIPSet(ipset, is.name, is.setType, (ipFamily == v1.IPv6Protocol), is.comment)
    	}
    	burstSyncs := 2
    	logger.V(2).Info("ipvs sync params", "minSyncPeriod", minSyncPeriod, "syncPeriod", syncPeriod, "burstSyncs", burstSyncs)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Apr 28 15:51:23 UTC 2024
    - 77.7K bytes
    - Viewed (0)
Back to top