MCPcopy Create free account
hub / github.com/rilldata/rill / ReloadConfig

Method ReloadConfig

runtime/runtime.go:263–277  ·  view source on GitHub ↗

ReloadConfig reloads the instance's configuration.

(ctx context.Context, instanceID string)

Source from the content-addressed store, hash-verified

261
262// ReloadConfig reloads the instance's configuration.
263func (r *Runtime) ReloadConfig(ctx context.Context, instanceID string) (ReloadConfigSummary, error) {
264 if r.configReloader != nil {
265 varsCount, modified, err := r.configReloader.reloadConfig(ctx, instanceID)
266 if err != nil {
267 return ReloadConfigSummary{}, err
268 }
269 return ReloadConfigSummary{VarsCount: varsCount, VarsModified: modified}, nil
270 }
271 // For runtimes without a config reloader (rill developer), pull env from admin service and merge with local .env files
272 count, modified, err := r.pullEnv(ctx, instanceID)
273 if err != nil {
274 return ReloadConfigSummary{}, err
275 }
276 return ReloadConfigSummary{VarsCount: count, VarsModified: modified}, nil
277}
278
279func (r *Runtime) pullEnv(ctx context.Context, instanceID string) (int, bool, error) {
280 inst, err := r.Instance(ctx, instanceID)

Callers

nothing calls this directly

Calls 2

pullEnvMethod · 0.95
reloadConfigMethod · 0.80

Tested by

no test coverage detected