Skip to content

ios: move configuration to Objective-C#420

Merged
rebello95 merged 2 commits intomasterfrom
config-objc
Sep 6, 2019
Merged

ios: move configuration to Objective-C#420
rebello95 merged 2 commits intomasterfrom
config-objc

Conversation

@rebello95
Copy link
Copy Markdown
Contributor

@rebello95 rebello95 commented Sep 6, 2019

This is a mirror of the Android change made in #385.

The change was originally motivated by the fact that Android was unable to obtain the configuration template within C++ before the JNI was loaded. Moving the template resolution logic to Java fixed this issue by allowing the JNI to be initialized before loading the template.

Key changes in this PR:

  • Moved template resolution to Objective-C
  • Custom YAML files are no longer treated as templates, and are not resolved (but are passed through as-is). This matches Android
  • Updated initializers as necessary to match Android

Signed-off-by: Michael Rebello me@michaelrebello.com

This is a mirror of the Android change made in #385.

Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: Michael Rebello <me@michaelrebello.com>

init(configYAML: String, logLevel: LogLevel, engine: EnvoyEngine) {
self.configYAML = configYAML
enum ConfigurationType {
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.

This is essentially a oneof that ends up being cleaner than having two optional properties

@rebello95 rebello95 merged commit 9560f38 into master Sep 6, 2019
@rebello95 rebello95 deleted the config-objc branch September 6, 2019 19:41
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