Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/19: ServiceInstanceListSupplierBuilder design basic implementation #24

Merged
merged 27 commits into from
Nov 13, 2020

Conversation

Johnny850807
Copy link
Collaborator

@Johnny850807 Johnny850807 commented Nov 6, 2020

Description

  • Basic ServiceInstanceListSupplierBuilder implementation
    • Also Include the decorators DelegatingServiceInstanceListSupplier and CachingServiceInstanceListSupplier

image

  • A CacheManager basic implementation helps handle caching get/put in a fluent way, for example
    cache_manager.get(CACHE_NAME).on_cache_miss(lambda: retrieve_value())
    • CacheManager is used by CachingServiceInstanceListSupplier

Currently, we do not optimize the caching behavior e.g. evict-and-replacement.

@Ricky587
Copy link

Ricky587 commented Nov 6, 2020

btw what happened to your pre-commit check?

@Johnny850807
Copy link
Collaborator Author

Johnny850807 commented Nov 6, 2020

btw what happened to your pre-commit check?

@Ricky587 Since my PRs are sequential, dev/20 based on dev/19, dev/19 based on dev/17, dev/17 based on main
and our CI workflow only triggered when PR is based on the [main] branch, so the CI is not working in these PRs.

BTW the pre-commit hook works very well locally, it's really convenient.

@Johnny850807 Johnny850807 requested review from benbenbang and Ricky587 and removed request for woolninesun and benbenbang November 7, 2020 04:49
@Johnny850807
Copy link
Collaborator Author

Revision Done

Base automatically changed from dev/17 to main November 11, 2020 12:27
@woolninesun
Copy link

LGTM for pythonic

@benbenbang
Copy link
Collaborator

Go go ;)

@Johnny850807 Johnny850807 merged commit 7fb4066 into main Nov 13, 2020
@Johnny850807 Johnny850807 deleted the dev/19 branch November 13, 2020 04:25
Copy link
Contributor

@TsengMJ TsengMJ left a comment

Choose a reason for hiding this comment

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

Reviewed

ck6990ck6990 pushed a commit that referenced this pull request Nov 18, 2020
#24)

* 🍺 implement DiscoveryClient design

* Add more comments

* Modify some functional operation concerning performance

* 📝 add typing and docstrings

* Make some fields private

* Fix naming

* pending discussion: next+filter vs list comprehension

* 🎨 Add type checking syntax

* improve filter_get_first utils

* ✨ FixedServiceInstanceListSupplier completed

* ✨ CachingServiceInstanceListSupplier completed

* 🎨 Add type checking syntax

* 🎨 Add NoneTypeError and some type checking

* 🍺 implement DiscoveryClient design

* Add more comments

* Modify some functional operation concerning performance

* 📝 add typing and docstrings

* Make some fields private

* Fix naming

* pending discussion: next+filter vs list comprehension

* 🎨 Add type checking syntax

* improve filter_get_first utils

* 🚚 Modify the package layout, rooted from spring_cloud

* add utils/validate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spring Cloud commons ServiceInstanceListSupplier design implementation
5 participants