-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iOS: split
EnvoyEngine.h
into multiple header files (#24397)
Resolves envoyproxy/envoy-mobile#333 Signed-off-by: JP Simard <jp@jpsim.com>
- Loading branch information
Showing
15 changed files
with
561 additions
and
483 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
#import "library/common/types/c_types.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/// Return codes for Engine interface. @see /library/common/types/c_types.h | ||
extern const int kEnvoySuccess; | ||
extern const int kEnvoyFailure; | ||
|
||
/// A set of headers that may be passed to/from an Envoy stream. | ||
typedef NSDictionary<NSString *, NSArray<NSString *> *> EnvoyHeaders; | ||
|
||
typedef NSDictionary<NSString *, NSString *> EnvoyTags; | ||
|
||
/// A set of key-value pairs describing an event. | ||
typedef NSDictionary<NSString *, NSString *> EnvoyEvent; | ||
|
||
/// Contains internal HTTP stream metrics, context, and other details. | ||
typedef envoy_stream_intel EnvoyStreamIntel; | ||
|
||
// Contains one time HTTP stream metrics, context, and other details. | ||
typedef envoy_final_stream_intel EnvoyFinalStreamIntel; | ||
|
||
NS_ASSUME_NONNULL_END |
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,101 @@ | ||
#import <Foundation/Foundation.h> | ||
|
||
@class EnvoyHTTPFilterFactory; | ||
@class EnvoyNativeFilterConfig; | ||
@class EnvoyStringAccessor; | ||
@protocol EnvoyKeyValueStore; | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/// Typed configuration that may be used for starting Envoy. | ||
@interface EnvoyConfiguration : NSObject | ||
|
||
@property (nonatomic, assign) BOOL adminInterfaceEnabled; | ||
@property (nonatomic, strong, nullable) NSString *grpcStatsDomain; | ||
@property (nonatomic, assign) UInt32 connectTimeoutSeconds; | ||
@property (nonatomic, assign) UInt32 dnsFailureRefreshSecondsBase; | ||
@property (nonatomic, assign) UInt32 dnsFailureRefreshSecondsMax; | ||
@property (nonatomic, assign) UInt32 dnsQueryTimeoutSeconds; | ||
@property (nonatomic, assign) UInt32 dnsMinRefreshSeconds; | ||
@property (nonatomic, strong) NSString *dnsPreresolveHostnames; | ||
@property (nonatomic, assign) UInt32 dnsRefreshSeconds; | ||
@property (nonatomic, assign) BOOL enableHappyEyeballs; | ||
@property (nonatomic, assign) BOOL enableGzip; | ||
@property (nonatomic, assign) BOOL enableBrotli; | ||
@property (nonatomic, assign) BOOL enableInterfaceBinding; | ||
@property (nonatomic, assign) BOOL enableDrainPostDnsRefresh; | ||
@property (nonatomic, assign) BOOL enforceTrustChainVerification; | ||
@property (nonatomic, assign) BOOL enablePlatformCertificateValidation; | ||
@property (nonatomic, assign) UInt32 h2ConnectionKeepaliveIdleIntervalMilliseconds; | ||
@property (nonatomic, assign) UInt32 h2ConnectionKeepaliveTimeoutSeconds; | ||
@property (nonatomic, assign) BOOL h2ExtendKeepaliveTimeout; | ||
@property (nonatomic, assign) UInt32 maxConnectionsPerHost; | ||
@property (nonatomic, assign) UInt32 statsFlushSeconds; | ||
@property (nonatomic, assign) UInt32 streamIdleTimeoutSeconds; | ||
@property (nonatomic, assign) UInt32 perTryIdleTimeoutSeconds; | ||
@property (nonatomic, strong) NSString *appVersion; | ||
@property (nonatomic, strong) NSString *appId; | ||
@property (nonatomic, strong) NSString *virtualClusters; | ||
@property (nonatomic, strong) NSString *directResponseMatchers; | ||
@property (nonatomic, strong) NSString *directResponses; | ||
@property (nonatomic, strong) NSArray<EnvoyNativeFilterConfig *> *nativeFilterChain; | ||
@property (nonatomic, strong) NSArray<EnvoyHTTPFilterFactory *> *httpPlatformFilterFactories; | ||
@property (nonatomic, strong) NSDictionary<NSString *, EnvoyStringAccessor *> *stringAccessors; | ||
@property (nonatomic, strong) NSDictionary<NSString *, id<EnvoyKeyValueStore>> *keyValueStores; | ||
@property (nonatomic, strong) NSArray<NSString *> *statsSinks; | ||
|
||
/** | ||
Create a new instance of the configuration. | ||
*/ | ||
- (instancetype)initWithAdminInterfaceEnabled:(BOOL)adminInterfaceEnabled | ||
GrpcStatsDomain:(nullable NSString *)grpcStatsDomain | ||
connectTimeoutSeconds:(UInt32)connectTimeoutSeconds | ||
dnsRefreshSeconds:(UInt32)dnsRefreshSeconds | ||
dnsFailureRefreshSecondsBase:(UInt32)dnsFailureRefreshSecondsBase | ||
dnsFailureRefreshSecondsMax:(UInt32)dnsFailureRefreshSecondsMax | ||
dnsQueryTimeoutSeconds:(UInt32)dnsQueryTimeoutSeconds | ||
dnsMinRefreshSeconds:(UInt32)dnsMinRefreshSeconds | ||
dnsPreresolveHostnames:(NSString *)dnsPreresolveHostnames | ||
enableHappyEyeballs:(BOOL)enableHappyEyeballs | ||
enableGzip:(BOOL)enableGzip | ||
enableBrotli:(BOOL)enableBrotli | ||
enableInterfaceBinding:(BOOL)enableInterfaceBinding | ||
enableDrainPostDnsRefresh:(BOOL)enableDrainPostDnsRefresh | ||
enforceTrustChainVerification:(BOOL)enforceTrustChainVerification | ||
enablePlatformCertificateValidation:(BOOL)enablePlatformCertificateValidation | ||
h2ConnectionKeepaliveIdleIntervalMilliseconds: | ||
(UInt32)h2ConnectionKeepaliveIdleIntervalMilliseconds | ||
h2ConnectionKeepaliveTimeoutSeconds:(UInt32)h2ConnectionKeepaliveTimeoutSeconds | ||
h2ExtendKeepaliveTimeout:(BOOL)h2ExtendKeepaliveTimeout | ||
maxConnectionsPerHost:(UInt32)maxConnectionsPerHost | ||
statsFlushSeconds:(UInt32)statsFlushSeconds | ||
streamIdleTimeoutSeconds:(UInt32)streamIdleTimeoutSeconds | ||
perTryIdleTimeoutSeconds:(UInt32)perTryIdleTimeoutSeconds | ||
appVersion:(NSString *)appVersion | ||
appId:(NSString *)appId | ||
virtualClusters:(NSString *)virtualClusters | ||
directResponseMatchers:(NSString *)directResponseMatchers | ||
directResponses:(NSString *)directResponses | ||
nativeFilterChain: | ||
(NSArray<EnvoyNativeFilterConfig *> *)nativeFilterChain | ||
platformFilterChain: | ||
(NSArray<EnvoyHTTPFilterFactory *> *)httpPlatformFilterFactories | ||
stringAccessors: | ||
(NSDictionary<NSString *, EnvoyStringAccessor *> *) | ||
stringAccessors | ||
keyValueStores: | ||
(NSDictionary<NSString *, id<EnvoyKeyValueStore>> *) | ||
keyValueStores | ||
statsSinks:(NSArray<NSString *> *)statsSinks; | ||
|
||
/** | ||
Resolves the provided configuration template using properties on this configuration. | ||
@param templateYAML The template configuration to resolve. | ||
@return The resolved template. Nil if the template fails to fully resolve. | ||
*/ | ||
- (nullable NSString *)resolveTemplate:(NSString *)templateYAML; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.