ipn: add comment about thread-safety to StateStore

Updates #cleanup

Signed-off-by: Percy Wegmann <percy@tailscale.com>
This commit is contained in:
Percy Wegmann 2024-03-06 12:29:20 -06:00 committed by Percy Wegmann
parent 0cb86468ca
commit 6f66f5a75a

View File

@ -72,6 +72,7 @@ func CurrentProfileKey(userID string) StateKey {
} }
// StateStore persists state, and produces it back on request. // StateStore persists state, and produces it back on request.
// Implementations of StateStore are expected to be safe for concurrent use.
type StateStore interface { type StateStore interface {
// ReadState returns the bytes associated with ID. Returns (nil, // ReadState returns the bytes associated with ID. Returns (nil,
// ErrStateNotExist) if the ID doesn't have associated state. // ErrStateNotExist) if the ID doesn't have associated state.