Skip to content

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

Merged
alyssawilk merged 6 commits into
envoyproxy:mainfrom
RyanTheOptimist:AlternateProtocolsCacheImpl
May 11, 2021
Merged

alyssawilk merged 6 commits into
envoyproxy:mainfrom
RyanTheOptimist:AlternateProtocolsCacheImpl

Conversation

@RyanTheOptimist

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

/assign @alyssawilk

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

@alyssawilk alyssawilk left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread include/envoy/common/http/BUILD Outdated
envoy_package()

envoy_cc_library(
name = "alternate_protocols_cache_interface",

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@alyssawilk alyssawilk left a comment

Copy link
Copy Markdown
Contributor

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 :-)

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