Skip to content

Comments

load_shed: make constructor for Overloaded error public#661

Merged
hawkw merged 3 commits intotower-rs:masterfrom
mattklein123:overloaded-public
Jun 13, 2022
Merged

load_shed: make constructor for Overloaded error public#661
hawkw merged 3 commits intotower-rs:masterfrom
mattklein123:overloaded-public

Conversation

@mattklein123
Copy link
Contributor

This allows for mocking. This also matches what is done for
the timeout Elapsed error.

Signed-off-by: Matt Klein [email protected]

This allows for mocking. This also matches what is done for
the timeout Elapsed error.

Signed-off-by: Matt Klein <[email protected]>
@mattklein123
Copy link
Contributor Author

Any chance of getting this reviewed/merged? Thank you!

Copy link
Member

@LucioFranco LucioFranco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay on this! I was out on vacation :D

Generally, we don't want to expose these constructors but we already do this for the Elapsed error in the timeout layer so I am fine with merging this.

Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me.

In general, we try to avoid exposing error type constructors when they're not necessary, as it poses a forward-compatibilty issue (we may want to add additional data to the error in the future), but in this case, it seems pretty unlikely, and if it's useful for testing, we may as well make it public.

@hawkw hawkw merged commit 3c170aa into tower-rs:master Jun 13, 2022
@mattklein123 mattklein123 deleted the overloaded-public branch June 13, 2022 21:34
@mattklein123
Copy link
Contributor Author

Awesome thank you for the merge!

hawkw pushed a commit that referenced this pull request Jun 17, 2022
This allows for mocking. This also matches what is done for
the timeout Elapsed error.

Signed-off-by: Matt Klein <[email protected]>
hawkw pushed a commit that referenced this pull request Jun 17, 2022
This allows for mocking. This also matches what is done for
the timeout Elapsed error.

Signed-off-by: Matt Klein <[email protected]>
hawkw added a commit that referenced this pull request Jun 17, 2022
# 0.4.13 (June 17, 2022)

### Added

- **load_shed**: Public constructor for `Overloaded` error ([#661])

### Fixed

- **util**: Fix hang with `call_all` when the `Stream` of requests is
  pending ([#656])
- **ready_cache**: Ensure cancelation is observed by pending services
  ([#668], fixes [#415])
- **docs**: Fix a missing section header due to a typo ([#646])
- **docs**: Fix broken links to `Service` trait ([#659])

[#661]: #661
[#656]: #656
[#668]: #668
[#415]: #415
[#646]: #646
[#659]: #659
hawkw added a commit that referenced this pull request Jun 17, 2022
# 0.4.13 (June 17, 2022)

### Added

- **load_shed**: Public constructor for `Overloaded` error ([#661])

### Fixed

- **util**: Fix hang with `call_all` when the `Stream` of requests is
  pending ([#656])
- **ready_cache**: Ensure cancelation is observed by pending services
  ([#668], fixes [#415])
- **docs**: Fix a missing section header due to a typo ([#646])
- **docs**: Fix broken links to `Service` trait ([#659])

[#661]: #661
[#656]: #656
[#668]: #668
[#415]: #415
[#646]: #646
[#659]: #659
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants