fromSecretsStore static method
Future<ModelRolesResolver>
fromSecretsStore(
- ModelRolesConfig config,
- SecretsStore store, {
- String? cwd,
- String? homeDir,
- void onNotice(
- FallbackNotice notice
- DateTime now()?,
- double jitterFraction()?,
- Future<
bool> sleeper(- Duration delay,
- CancelToken? cancelToken
- StreamFunction streamFactory()?,
Builds a resolver from a SecretsStore (reads the bulk snapshot once).
Implementation
static Future<ModelRolesResolver> fromSecretsStore(
ModelRolesConfig config,
SecretsStore store, {
String? cwd,
String? homeDir,
void Function(FallbackNotice notice)? onNotice,
DateTime Function()? now,
double Function()? jitterFraction,
Future<bool> Function(Duration delay, CancelToken? cancelToken)? sleeper,
StreamFunction Function(String kind, String apiKey)? streamFactory,
}) async {
return ModelRolesResolver(
config: config,
secrets: await store.readAll(),
cwd: cwd,
homeDir: homeDir,
onNotice: onNotice,
now: now,
jitterFraction: jitterFraction,
sleeper: sleeper,
streamFactory: streamFactory,
);
}