@@ -3,7 +3,7 @@ use std::path::{Path, PathBuf};
33use anyhow:: Context as _;
44use spin_common:: ui:: quoted_path;
55use spin_factor_key_value:: runtime_config:: spin:: { self as key_value} ;
6- use spin_factor_key_value:: { DefaultLabelResolver as _ , KeyValueFactor } ;
6+ use spin_factor_key_value:: KeyValueFactor ;
77use spin_factor_llm:: { spin as llm, LlmFactor } ;
88use spin_factor_outbound_http:: OutboundHttpFactor ;
99use spin_factor_outbound_mqtt:: OutboundMqttFactor ;
@@ -156,33 +156,6 @@ where
156156 } )
157157 }
158158
159- /// Set initial key-value pairs supplied in the CLI arguments in the default store.
160- pub async fn set_initial_key_values (
161- & self ,
162- initial_key_values : impl IntoIterator < Item = & ( String , String ) > ,
163- ) -> anyhow:: Result < ( ) > {
164- // We don't want to unnecessarily interact with the default store
165- let mut iter = initial_key_values. into_iter ( ) . peekable ( ) ;
166- if iter. peek ( ) . is_none ( ) {
167- return Ok ( ( ) ) ;
168- }
169-
170- let store = self
171- . key_value_resolver
172- . default ( DEFAULT_KEY_VALUE_STORE_LABEL )
173- . expect ( "trigger was misconfigured and lacks a default store" )
174- . get ( DEFAULT_KEY_VALUE_STORE_LABEL )
175- . await
176- . expect ( "trigger was misconfigured and lacks a default store" ) ;
177- for ( key, value) in iter {
178- store
179- . set ( key, value. as_bytes ( ) )
180- . await
181- . context ( "failed to set key-value pair" ) ?;
182- }
183- Ok ( ( ) )
184- }
185-
186159 /// The fully resolved state directory.
187160 pub fn state_dir ( & self ) -> Option < PathBuf > {
188161 self . state_dir . clone ( )
0 commit comments