MCPcopy Index your code
hub / github.com/coder/coder / GetRuntimeConfig

Method GetRuntimeConfig

coderd/runtimeconfig/resolver.go:49–59  ·  view source on GitHub ↗
(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

47}
48
49func (m StoreResolver) GetRuntimeConfig(ctx context.Context, key string) (string, error) {
50 val, err := m.db.GetRuntimeConfig(ctx, key)
51 if err != nil {
52 if errors.Is(err, sql.ErrNoRows) {
53 return "", xerrors.Errorf("%q: %w", key, ErrEntryNotFound)
54 }
55 return "", xerrors.Errorf("fetch %q: %w", key, err)
56 }
57
58 return val, nil
59}
60
61func (m StoreResolver) UpsertRuntimeConfig(ctx context.Context, key, val string) error {
62 err := m.db.UpsertRuntimeConfig(ctx, database.UpsertRuntimeConfigParams{Key: key, Value: val})

Callers

nothing calls this directly

Calls 3

GetRuntimeConfigMethod · 0.65
IsMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected