mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-17 16:11:15 +00:00
Make notifier optional
This commit is contained in:
parent
f4ef308923
commit
34e6de07fb
@ -303,6 +303,7 @@ func (s *Store) listAndWatch(apiOp *types.APIRequest, k8sClient dynamic.Resource
|
|||||||
watcher.Stop()
|
watcher.Stop()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
if s.notifier != nil {
|
||||||
eg.Go(func() error {
|
eg.Go(func() error {
|
||||||
for rel := range s.notifier.OnInboundRelationshipChange(ctx, schema, apiOp.Namespace) {
|
for rel := range s.notifier.OnInboundRelationshipChange(ctx, schema, apiOp.Namespace) {
|
||||||
obj, err := s.byID(apiOp, schema, rel.Name)
|
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")
|
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