Line data Source code
1 : #pragma once 2 : 3 : #include <memory> 4 : 5 : #include "envoy/common/pure.h" 6 : 7 : #include "absl/types/optional.h" 8 : 9 : namespace Envoy { 10 : namespace Extensions { 11 : namespace Common { 12 : namespace Aws { 13 : 14 : /** 15 : * Interface for classes capable of discovering the AWS region from the execution environment. 16 : */ 17 : class RegionProvider { 18 : public: 19 0 : virtual ~RegionProvider() = default; 20 : 21 : /** 22 : * Discover and return the AWS region. 23 : * @return AWS region, or nullopt if unable to discover the region. 24 : */ 25 : virtual absl::optional<std::string> getRegion() PURE; 26 : }; 27 : 28 : using RegionProviderPtr = std::unique_ptr<RegionProvider>; 29 : using RegionProviderSharedPtr = std::shared_ptr<RegionProvider>; 30 : 31 : } // namespace Aws 32 : } // namespace Common 33 : } // namespace Extensions 34 : } // namespace Envoy