cloudfoundry-incubator / eirinix

Extensions Library for Cloud Foundry Eirini
Apache License 2.0
2 stars 5 forks source link

Return a special error when watcher channel is closed #19

Closed jimmykarily closed 4 years ago

jimmykarily commented 4 years ago

so consumers can act upon the error as they desire (reconnect?)

jimmykarily commented 4 years ago

A consumer can use a block like this to filter for "watcher channel closed" error:

if err, ok := err.(*extension.WatcherChannelClosedError); ok {
// Do things
}
codecov[bot] commented 4 years ago

Codecov Report

Merging #19 into master will increase coverage by 2.96%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
+ Coverage   71.09%   74.05%   +2.96%     
==========================================
  Files           3        3              
  Lines         422      424       +2     
==========================================
+ Hits          300      314      +14     
+ Misses         98       82      -16     
- Partials       24       28       +4
Impacted Files Coverage Δ
manager.go 69.65% <100%> (+6.33%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dcb6e76...5d75160. Read the comment docs.