Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Return a special error when watcher channel is closed #19

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

jimmykarily
Copy link
Collaborator

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

@jimmykarily
Copy link
Collaborator Author

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

if err, ok := err.(*extension.WatcherChannelClosedError); ok {
// Do things
}

manager.go Show resolved Hide resolved
manager.go Show resolved Hide resolved
@jimmykarily jimmykarily force-pushed the return_special_error_on_watcher branch from 076f4e0 to a698f27 Compare January 27, 2020 14:18
so consumers can act upon the error as they desire (reconnect?)
@jimmykarily jimmykarily force-pushed the return_special_error_on_watcher branch from a698f27 to 5d75160 Compare January 27, 2020 14:19
@codecov
Copy link

codecov bot commented Jan 27, 2020

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%) ⬆️

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants