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

Restructure syncer package #492

Merged
merged 2 commits into from
Oct 14, 2018
Merged

Conversation

freehan
Copy link
Contributor

@freehan freehan commented Sep 24, 2018

Structural changes only. No functional change:

  • Refactor syncer package to support multiple NEG syncer implementations.
  • Extract common utils from batchSyncer for reuse.

cc: @agau4779

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 24, 2018
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2018
@freehan freehan force-pushed the unblocking-syncer branch 2 times, most recently from 719a195 to d35d3a3 Compare September 25, 2018 22:45

// encodeEndpoint encodes ip and instance into a single string
func encodeEndpoint(ip, instance, port string) string {
return fmt.Sprintf("%s||%s||%s", ip, instance, port)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit - since || is used as the separator elsewhere, keep as const at the top

Copy link
Contributor

@agau4779 agau4779 left a comment

Choose a reason for hiding this comment

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

Are we still using formattedName anywhere else? If not, can we remove it?

return nil
}

func negSyncerName(key NegSyncerKey) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

this could be a func (k NegSyncerKey) String() string method

@freehan freehan force-pushed the unblocking-syncer branch 2 times, most recently from f9c7c17 to 5df00df Compare October 3, 2018 19:11
@freehan
Copy link
Contributor Author

freehan commented Oct 3, 2018

fixed the comments

Copy link
Contributor

@agau4779 agau4779 left a comment

Choose a reason for hiding this comment

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

lgtm

@freehan freehan force-pushed the unblocking-syncer branch from 5df00df to e35f1d5 Compare October 3, 2018 21:49
@bowei
Copy link
Member

bowei commented Oct 14, 2018

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 14, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bowei, freehan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 2d2c91a into kubernetes:master Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants