-
Notifications
You must be signed in to change notification settings - Fork 95
Add UpdateHostsForDeployment API to replicatorClientFactory so that replicator host is updatable #237
Conversation
You should implement zookeeper server for host updater |
783d638
to
dd6d35a
Compare
@@ -42,3 +47,14 @@ func (r *ReplicatorConfig) GetReplicatorHosts() map[string]string { | |||
func (r *ReplicatorConfig) GetDefaultAuthoritativeZone() string { | |||
return r.DefaultAuthoritativeZone | |||
} | |||
|
|||
// GetUseStandalone checks whether a specific deployment is using standalone deployment | |||
func (r *ReplicatorConfig) GetUseStandalone(deployment string) bool { |
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 feel this is irrelevant to open source users.
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.
Yea, open source is not using this config. Right now we don't have a clean way to have 'internal only' config(interface is defined in open source) so keep it here for now.
h, tc := replicator.NewReplicator(serviceName, sCommon, meta, replicator.NewReplicatorClientFactory(cfg, common.GetDefaultLogger()), cfg) | ||
allHosts := cfg.GetReplicatorConfig().GetReplicatorHosts() | ||
allSplitHosts := make(map[string][]string) | ||
for deployment, hosts := range allHosts { |
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 almost feel GetReplicatorHosts()
should include this logic and return map[string][]string
. Thoughts?
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.
These logic is more like a util function rather than some logic that is specific to replicator, so I slightly feel better to keep it outside.
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.
Generally looks good. Minor comments that it is up to you whether you want to address them.
73e9736
to
958fd58
Compare
No description provided.