mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-16 23:51:13 +00:00
Make notifier optional
This commit is contained in:
parent
f4ef308923
commit
34e6de07fb
@ -303,15 +303,17 @@ func (s *Store) listAndWatch(apiOp *types.APIRequest, k8sClient dynamic.Resource
|
|||||||
watcher.Stop()
|
watcher.Stop()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
eg.Go(func() error {
|
if s.notifier != nil {
|
||||||
for rel := range s.notifier.OnInboundRelationshipChange(ctx, schema, apiOp.Namespace) {
|
eg.Go(func() error {
|
||||||
obj, err := s.byID(apiOp, schema, rel.Name)
|
for rel := range s.notifier.OnInboundRelationshipChange(ctx, schema, apiOp.Namespace) {
|
||||||
if err == nil {
|
obj, err := s.byID(apiOp, schema, rel.Name)
|
||||||
result <- s.toAPIEvent(apiOp, schema, watch.Modified, obj)
|
if err == nil {
|
||||||
|
result <- s.toAPIEvent(apiOp, schema, watch.Modified, obj)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
return fmt.Errorf("closed")
|
||||||
return fmt.Errorf("closed")
|
})
|
||||||
})
|
}
|
||||||
|
|
||||||
eg.Go(func() error {
|
eg.Go(func() error {
|
||||||
for event := range watcher.ResultChan() {
|
for event := range watcher.ResultChan() {
|
||||||
|
Loading…
Reference in New Issue
Block a user