forked from envoyproxy/envoy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from envoyproxy/master
router: Add support for per-route configurable maximum number of inte…
- Loading branch information
Showing
23 changed files
with
354 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 17 additions & 1 deletion
18
generated_api_shadow/envoy/api/v2/route/route_components.proto
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
19 changes: 18 additions & 1 deletion
19
generated_api_shadow/envoy/config/route/v3alpha/route_components.proto
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include "envoy/common/pure.h" | ||
#include "envoy/stream_info/filter_state.h" | ||
|
||
namespace Envoy { | ||
namespace StreamInfo { | ||
|
||
/** | ||
* A FilterState object that tracks a single uint32_t value. | ||
*/ | ||
class UInt32Accessor : public FilterState::Object { | ||
public: | ||
/** | ||
* Increments the tracked value by 1. | ||
*/ | ||
virtual void increment() PURE; | ||
|
||
/** | ||
* @return the tracked value. | ||
*/ | ||
virtual uint32_t value() const PURE; | ||
}; | ||
|
||
} // namespace StreamInfo | ||
} // namespace Envoy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#pragma once | ||
|
||
#include "envoy/stream_info/uint32_accessor.h" | ||
|
||
namespace Envoy { | ||
namespace StreamInfo { | ||
|
||
/* | ||
* A FilterState object that tracks a single uint32_t value. | ||
*/ | ||
class UInt32AccessorImpl : public UInt32Accessor { | ||
public: | ||
UInt32AccessorImpl(uint32_t value) : value_(value) {} | ||
|
||
// From FilterState::Object | ||
ProtobufTypes::MessagePtr serializeAsProto() const override { | ||
auto message = std::make_unique<ProtobufWkt::UInt32Value>(); | ||
message->set_value(value_); | ||
return message; | ||
} | ||
|
||
// From UInt32Accessor. | ||
void increment() override { value_++; } | ||
uint32_t value() const override { return value_; } | ||
|
||
private: | ||
uint32_t value_; | ||
}; | ||
|
||
} // namespace StreamInfo | ||
} // namespace Envoy |
Oops, something went wrong.