- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for newBitset (0.2 sec)
-
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) -
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) -
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) -
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) -
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) -
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)