- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 79 for DeleteFunc (0.26 sec)
-
plugin/pkg/auth/authorizer/node/graph_populator.go
podHandler, _ := pods.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: g.addPod, UpdateFunc: g.updatePod, DeleteFunc: g.deletePod, }) pvsHandler, _ := pvs.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ AddFunc: g.addPV, UpdateFunc: g.updatePV, DeleteFunc: g.deletePV, }) attachHandler, _ := attachments.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 21:22:55 UTC 2024 - 6.5K bytes - Viewed (0) -
src/maps/maps.go
// with the key in src. func Copy[M1 ~map[K]V, M2 ~map[K]V, K comparable, V any](dst M1, src M2) { for k, v := range src { dst[k] = v } } // DeleteFunc deletes any key/value pairs from m for which del returns true. func DeleteFunc[M ~map[K]V, K comparable, V any](m M, del func(K, V) bool) { for k, v := range m { if del(k, v) { delete(m, k) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 28 20:35:05 UTC 2024 - 1.8K bytes - Viewed (0) -
pkg/kube/controllers/common.go
if e.UpdateFunc != nil { e.UpdateFunc(Extract[T](oldObj), Extract[T](newObj)) } } func (e EventHandler[T]) OnDelete(obj interface{}) { if e.DeleteFunc != nil { e.DeleteFunc(Extract[T](obj)) } } var _ cache.ResourceEventHandler = EventHandler[Object]{} type Shutdowner interface { ShutdownHandlers() }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Apr 11 08:27:29 UTC 2024 - 8.9K bytes - Viewed (0) -
src/maps/maps_test.go
} func TestDeleteFunc(t *testing.T) { mc := Clone(m1) DeleteFunc(mc, func(int, int) bool { return false }) if !Equal(mc, m1) { t.Errorf("DeleteFunc(%v, true) = %v, want %v", m1, mc, m1) } DeleteFunc(mc, func(k, v int) bool { return k > 3 }) want := map[int]int{1: 2, 2: 4} if !Equal(mc, want) { t.Errorf("DeleteFunc result = %v, want %v", mc, want) } } var n map[int]int
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 17:05:56 UTC 2023 - 5.6K bytes - Viewed (0) -
src/maps/example_test.go
// m3 is: map[one:[100 2 3] two:[4 5 6]] // m4 is: map[one:[100 2 3] two:[4 5 6]] } func ExampleDeleteFunc() { m := map[string]int{ "one": 1, "two": 2, "three": 3, "four": 4, } maps.DeleteFunc(m, func(k string, v int) bool { return v%2 != 0 // delete odd values }) fmt.Println(m) // Output: // map[four:4 two:2] } func ExampleEqual() { m1 := map[int]string{ 1: "one",
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 11 20:21:56 UTC 2023 - 2.2K bytes - Viewed (0) -
pkg/test/framework/components/echo/kube/pod_controller.go
}, UpdateFunc: func(old, cur *corev1.Pod) { q.Push(func() error { if old.GetResourceVersion() != cur.GetResourceVersion() { return handlers.updated(cur) } return nil }) }, DeleteFunc: func(pod *corev1.Pod) { q.Push(func() error { return handlers.deleted(pod) }) }, }) return &podController{ q: q, informer: informer, } }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 09 02:22:47 UTC 2023 - 2.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/peerproxy/peerproxy.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jul 19 00:36:22 UTC 2023 - 2K bytes - Viewed (0) -
pkg/proxy/config/config.go
} _, _ = endpointSliceInformer.Informer().AddEventHandlerWithResyncPeriod( cache.ResourceEventHandlerFuncs{ AddFunc: result.handleAddEndpointSlice, UpdateFunc: result.handleUpdateEndpointSlice, DeleteFunc: result.handleDeleteEndpointSlice, }, resyncPeriod, ) return result } // RegisterEventHandler registers a handler which is called on every endpoint slice change.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 22 05:08:41 UTC 2024 - 15.1K bytes - Viewed (0) -
src/encoding/csv/fuzz_test.go
// Note that the reader parses the quoted record "" as an empty string, // and the writer turns that into an empty line, which the reader skips over. // Filter those out to avoid false positives. records = slices.DeleteFunc(records, func(record []string) bool { return len(record) == 1 && record[0] == "" }) // The reader uses nil when returning no records at all. if len(records) == 0 { records = nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 05 01:26:13 UTC 2024 - 2.5K bytes - Viewed (0) -
pkg/scheduler/eventhandlers.go
return false } }, Handler: cache.ResourceEventHandlerFuncs{ AddFunc: sched.addPodToCache, UpdateFunc: sched.updatePodInCache, DeleteFunc: sched.deletePodFromCache, }, }, ); err != nil { return err } handlers = append(handlers, handlerRegistration) // unscheduled pod queue
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 21:21:04 UTC 2024 - 24K bytes - Viewed (0)