From 53747d35fbb6cc3270ad511da9df8ff5cbf02446 Mon Sep 17 00:00:00 2001 From: "docs.yml" <> Date: Mon, 12 Feb 2024 15:50:05 +0000 Subject: [PATCH] docs.yml --- site/content/en/main/user-guide/store.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/site/content/en/main/user-guide/store.md b/site/content/en/main/user-guide/store.md index 928ff0ee6..89e491a70 100644 --- a/site/content/en/main/user-guide/store.md +++ b/site/content/en/main/user-guide/store.md @@ -41,8 +41,9 @@ const unsubscribe = Store.subscribe(data => { - `getItem(key: string)`: Retrieves a value by its key. Returns `null` if the key doesn't exist. - `setItem(key: string, value: string)`: Sets a value for a given key. Creates a new key-value pair if the key doesn't exist. -- `setItemAndWait(key: string, value: string)`: Sets a value for a given key. Creates a new key-value pair if the key doesn't exist. Returns a promise when the new key and value show up in the store. Should only be used on a `Watch` to avoid [timeouts](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#timeouts). +- `setItemAndWait(key: string, value: string)`: Sets a value for a given key. Creates a new key-value pair if the key doesn't exist. Resolves a promise when the new key and value show up in the store. Note - Async operations in Mutate and Validate are susceptible to [timeouts](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#timeouts). - `removeItem(key: string)`: Deletes a key-value pair by its key. +- `removeItemAndWait(key: string)`: Deletes a key-value pair by its key and resolves a promise when the key and value do not show up in the store. Note - Async operations in Mutate and Validate are susceptible to [timeouts](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#timeouts). - `clear()`: Clears all key-value pairs from the store. - `subscribe(listener: DataReceiver)`: Subscribes to store updates. - `onReady(callback: DataReceiver)`: Executes a callback when the store is ready.