- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ChannelWithContext (0.38 sec)
-
pkg/kubelet/config/mux_test.go
ctx, cancel := context.WithCancel(context.Background()) defer cancel() mux := newMux(nil) channelOne := mux.ChannelWithContext(ctx, "one") if channelOne != mux.ChannelWithContext(ctx, "one") { t.Error("Didn't get the same muxuration channel back with the same name") } channelTwo := mux.ChannelWithContext(ctx, "two") if channelOne == channelTwo { t.Error("Got back the same muxuration channel for different names") } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jan 30 20:02:23 UTC 2024 - 2.5K bytes - Viewed (0) -
pkg/kubelet/config/mux.go
merger: merger, } return mux } // ChannelWithContext returns a channel where a configuration source // can send updates of new configurations. Multiple calls with the same // source will return the same channel. This allows change and state based sources // to use the same channel. Different source names however will be treated as a // union. func (m *mux) ChannelWithContext(ctx context.Context, source string) chan interface{} {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jan 30 20:02:23 UTC 2024 - 2.3K bytes - Viewed (0) -
pkg/kubelet/config/config.go
// only accepts PodUpdates func (c *PodConfig) Channel(ctx context.Context, source string) chan<- interface{} { c.sourcesLock.Lock() defer c.sourcesLock.Unlock() c.sources.Insert(source) return c.mux.ChannelWithContext(ctx, source) } // SeenAllSources returns true if seenSources contains all sources in the // config, and also this config has received a SET message from each source.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 06:25:43 UTC 2024 - 16.7K bytes - Viewed (0)