Line data Source code
1 : #pragma once 2 : 3 : #include "source/common/version/api_version_struct.h" 4 : 5 : // Defines the ApiVersion current version (Envoy::api_version), and oldest 6 : // version (Envoy::oldest_api_version). 7 : #include "source/common/version/api_version_number.h" 8 : 9 : namespace Envoy { 10 : 11 : /** 12 : * Wraps compiled in api versioning. 13 : */ 14 : class ApiVersionInfo { 15 : public: 16 : // Returns the most recent API version that is supported by the client. 17 0 : static constexpr ApiVersion apiVersion() { return api_version; } 18 : 19 : // Returns the oldest API version that is supported by the client. 20 0 : static constexpr ApiVersion oldestApiVersion() { return oldest_api_version; } 21 : }; 22 : 23 : } // namespace Envoy