engine: resources: The kv resource can set un-mapped values

Previously the resource could only set values in a per-hostname
namespace, but for single, user-managed values, we'd like to be able to
control things entirely. Now this resource can do that.
This commit is contained in:
James Shubin
2024-01-16 16:04:12 -05:00
parent 6f1f69683d
commit 377d62999f
5 changed files with 86 additions and 6 deletions

View File

@@ -128,6 +128,8 @@ func (obj *World) StrGet(ctx context.Context, namespace string) (string, error)
}
// StrSet sets the namespace value to a particular string.
// XXX: This can overwrite another hosts value that was set with StrMapSet. Add
// possible cryptographic signing or special namespacing to prevent such things.
func (obj *World) StrSet(ctx context.Context, namespace, value string) error {
return str.SetStr(ctx, obj.Client, namespace, &value)
}