mirror of
https://github.com/niusmallnan/steve.git
synced 2025-09-05 15:11:26 +00:00
Make notifier optional
This commit is contained in:
@@ -303,6 +303,7 @@ func (s *Store) listAndWatch(apiOp *types.APIRequest, k8sClient dynamic.Resource
|
||||
watcher.Stop()
|
||||
}()
|
||||
|
||||
if s.notifier != nil {
|
||||
eg.Go(func() error {
|
||||
for rel := range s.notifier.OnInboundRelationshipChange(ctx, schema, apiOp.Namespace) {
|
||||
obj, err := s.byID(apiOp, schema, rel.Name)
|
||||
@@ -312,6 +313,7 @@ func (s *Store) listAndWatch(apiOp *types.APIRequest, k8sClient dynamic.Resource
|
||||
}
|
||||
return fmt.Errorf("closed")
|
||||
})
|
||||
}
|
||||
|
||||
eg.Go(func() error {
|
||||
for event := range watcher.ResultChan() {
|
||||
|
Reference in New Issue
Block a user