-
Notifications
You must be signed in to change notification settings - Fork 800
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
New persistence client bean for DB clients management #2795
Conversation
common/persistence/client/bean.go
Outdated
) | ||
|
||
// NewBeanByFactory crate a new store bean using factory | ||
func NewBeanByFactory( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about NewBeanFromFactory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
common/persistence/client/factory.go
Outdated
@@ -44,8 +44,8 @@ type ( | |||
NewTaskManager() (p.TaskManager, error) | |||
// NewShardManager returns a new shard manager | |||
NewShardManager() (p.ShardManager, error) | |||
// NewHistoryV2Manager returns a new historyV2 manager | |||
NewHistoryV2Manager() (p.HistoryManager, error) | |||
// NewHistoryManager returns a new historyV2 manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you also fix the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
|
||
type ( | ||
// Bean in an collection of persistence manager | ||
Bean interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it being used anywhere in this PR? or just for future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have a really large commit doing service startup logic refactoring, this is part of that
@@ -18,7 +18,7 @@ | |||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |||
// THE SOFTWARE. | |||
|
|||
package persistence | |||
package client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename the New()
function in this file to maybe NewFactory()
? I think client.New()
returning a persistence factory is kind of counter-intuitive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.