Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UUIDMap ¶
type UUIDMap[T any] interface { // New create a (id -> T) mapping and return id. New() string // Get return (T, alive) by id, return nil if id does not exist. Get(id string) (*T, bool) // Del delete uuid. Del(id string) // SetAlive flag of id SetAlive(id string, alive bool) // Size return the number of T. Size() int // Destroy the resource hold by the State. Destroy() }
UUIDMap provide a goroutine-safe mapping from UUID to T.
Click to show internal directories.
Click to hide internal directories.