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

grid: Rename alternate_protocols_cache.{h,cc} to alternate_protocols_cache_impl.{h,cc} #16424

Merged

Conversation

RyanTheOptimist
Copy link
Contributor

grid: Rename alternate_protocols_cache.{h,cc} to alternate_protocols_cache_impl.{h,cc}

Risk Level: Low
Testing: N/A - rename only
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

@RyanTheOptimist RyanTheOptimist force-pushed the AlternateProtocolsCacheImpl branch from e7bc390 to d7ee30d Compare May 10, 2021 18:52
@RyanTheOptimist
Copy link
Contributor Author

/assign @alyssawilk

Signed-off-by: Ryan Hamilton <[email protected]>
Signed-off-by: Ryan Hamilton <[email protected]>
Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for splitting this out, much easier to review this way even if git still can't handle diffs =P

envoy_package()

envoy_cc_library(
name = "alternate_protocols_cache_interface",
Copy link
Contributor

Choose a reason for hiding this comment

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

generally we skip interface for these library names

Copy link
Contributor

Choose a reason for hiding this comment

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

-> include/envoy/http and I'm so sorry if I guessed the wrong name offhand

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to envoy/http/. But the others in that dir have _interface so I kept the suffix.

@@ -73,34 +73,22 @@ class AlternateProtocolsCache {
uint32_t port_;
};

explicit AlternateProtocolsCache(TimeSource& time_source);
virtual ~AlternateProtocolsCache() = default;

// Sets the possible alternative protocols which can be used to connect to the
// specified origin. Expires after the specified expiration time.
Copy link
Contributor

Choose a reason for hiding this comment

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

javadoc comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

explicit AlternateProtocolsCacheImpl(TimeSource& time_source);
~AlternateProtocolsCacheImpl() override;

// Sets the possible alternative protocols which can be used to connect to the
Copy link
Contributor

Choose a reason for hiding this comment

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

Now these are overrides the common thing to do is

// AlternateProtocolsCache
block of uncommented override functions

since it's "known" you refer to the API for what it's doing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good point. Done.

// Tracks alternate protocols that can be used to make an HTTP connection to an origin server.
// See https://tools.ietf.org/html/rfc7838 for HTTP Alternate Services and
// https://datatracker.ietf.org/doc/html/draft-ietf-dnsop-svcb-https-04 for the
// "HTTPS" DNS resource record.
Copy link
Contributor

Choose a reason for hiding this comment

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

update class comments for less copy/pasting?
an implementation of AlternateProtocolsCache [anything special or unique]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. (Will expand the comment in the larger PR when it does more, like use TLS)

Signed-off-by: Ryan Hamilton <[email protected]>
Signed-off-by: Ryan Hamilton <[email protected]>
alyssawilk
alyssawilk previously approved these changes May 10, 2021
Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

lgtm modulo whitespace nit

Let's land that in #16385 so you don't lose an hour of CI :-)

include/envoy/http/alternate_protocols_cache.h Outdated Show resolved Hide resolved
Signed-off-by: Ryan Hamilton <[email protected]>
@alyssawilk alyssawilk merged commit 049bdb3 into envoyproxy:main May 11, 2021
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.

2 participants