Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add constructor for HostComponentInitData #1588

Merged
merged 1 commit into from
Jun 18, 2023

Conversation

itowlson
Copy link
Contributor

This is a purely technical change to better support embedding scenarios. At the moment, an embedder wanting to leverage TriggerExecutorBuilder::build() can only provide empty initialisation data; this provides for embedders to support spin up --key-value-style storage setup features.

@itowlson itowlson requested a review from lann June 14, 2023 22:04
Comment on lines 169 to 174
key_value_init_values: &[(String, String)],
sqlite_init_statements: &[String],
) -> Self {
Self {
kv: key_value_init_values.to_vec(),
sqlite: sqlite_init_statements.to_vec(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little more flexible (and equivalent for those specific argument types):

Suggested change
key_value_init_values: &[(String, String)],
sqlite_init_statements: &[String],
) -> Self {
Self {
kv: key_value_init_values.to_vec(),
sqlite: sqlite_init_statements.to_vec(),
key_value_init_values: impl Into<Vec<(String, String)>>,
sqlite_init_statements: impl Into<Vec<String>>,
) -> Self {
Self {
kv: key_value_init_values.into(),
sqlite: sqlite_init_statements.into(),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, of course - thanks!

Signed-off-by: itowlson <ivan.towlson@fermyon.com>
@itowlson itowlson force-pushed the public-host-component-init-data branch from 36ac19c to 04b5fa8 Compare June 15, 2023 20:37
@itowlson itowlson requested a review from lann June 15, 2023 20:37
@itowlson itowlson merged commit 881a3be into fermyon:main Jun 18, 2023
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