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

proxy: Fill in { world | host } destination identity at egress #1615

Merged
merged 6 commits into from
Sep 28, 2017

Conversation

tgraf
Copy link
Member

@tgraf tgraf commented Sep 28, 2017

No description provided.

Decoupled the consumable cache from the daemon structure

Signed-off-by: Thomas Graf <[email protected]>
Also improves the unit test to hardcode the identity values that should
never ever change again.

Signed-off-by: Thomas Graf <[email protected]>
Signed-off-by: Thomas Graf <[email protected]>
@@ -162,16 +172,19 @@ const (
ID_UNKNOWN NumericIdentity = iota
ID_HOST
ID_WORLD
ID_CLUSTER

Choose a reason for hiding this comment

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

don't use ALL_CAPS in Go names; use CamelCase

ID_UNKNOWN NumericIdentity = iota
ID_HOST
ID_WORLD
IdentityUnknown NumericIdentity = iota

Choose a reason for hiding this comment

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

exported const IdentityUnknown should have comment (or a comment on this block) or be unexported

// identity. The SHA is calculated if not already cached.
func (id *Identity) GetLabelsSHA256() string {
if id.LabelsSHA256 == "" {
id.LabelsSHA256 = id.Labels.SHA256Sum()
Copy link
Member

Choose a reason for hiding this comment

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

How can we guarantee the LabelsSHA256 is updated when in change a label in id.Labels?

Copy link
Member Author

@tgraf tgraf Sep 28, 2017

Choose a reason for hiding this comment

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

The labels of an identity never change. If the labels of an endpoint change, a new identity is created/assigned.

@tgraf tgraf merged commit 7549965 into master Sep 28, 2017
@tgraf tgraf deleted the proxy-world-log branch September 28, 2017 17:02
Copy link

@manalibhutiyani manalibhutiyani left a comment

Choose a reason for hiding this comment

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

looks good

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.

5 participants