Skip to content

Commit

Permalink
Add Services multiplexing support in EventsMultiplexers interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoxhaa committed Dec 17, 2024
1 parent 40781fc commit 36c5f7c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions internal/cache/v1/multiplexers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type EventsMultiplexers interface {
Nodes() EventsMultiplexer
Pods() EventsMultiplexer
ReplicaSets() EventsMultiplexer
Services() EventsMultiplexer
StatefulSets() EventsMultiplexer
Run(context.Context) error
}
Expand Down Expand Up @@ -59,6 +60,7 @@ type multiplexers struct {
nodes events
pods events
replicaSets events
services events
statefulSets events
}

Expand All @@ -82,6 +84,10 @@ func (m multiplexers) ReplicaSets() EventsMultiplexer {
return m.replicaSets
}

func (m multiplexers) Services() EventsMultiplexer {
return m.services
}

func (m multiplexers) StatefulSets() EventsMultiplexer {
return m.statefulSets
}
Expand Down Expand Up @@ -109,6 +115,10 @@ func (m multiplexers) Run(ctx context.Context) error {
return m.replicaSets.Run(ctx)
})

g.Go(func() error {
return m.services.Run(ctx)
})

g.Go(func() error {
return m.statefulSets.Run(ctx)
})
Expand Down Expand Up @@ -140,6 +150,10 @@ func init() {
upsertEvents: internal.NewChannelMux[any](),
deleteEvents: internal.NewChannelMux[any](),
},
services: events{
upsertEvents: internal.NewChannelMux[any](),
deleteEvents: internal.NewChannelMux[any](),
},
statefulSets: events{
upsertEvents: internal.NewChannelMux[any](),
deleteEvents: internal.NewChannelMux[any](),
Expand Down

0 comments on commit 36c5f7c

Please sign in to comment.