Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderedStore ¶
type OrderedStore[T any] struct { sync.RWMutex // Whether or not to track in this state Disabled bool // contains filtered or unexported fields }
An orderedstore is a basic store that preserves insert order by using an orderedmap instead of a map
func (*OrderedStore[T]) Delete ¶
func (s *OrderedStore[T]) Delete(id string) error
Delete an entity from the state
func (*OrderedStore[T]) Get ¶
func (s *OrderedStore[T]) Get(id string) (*T, error)
func (*OrderedStore[T]) Init ¶
func (s *OrderedStore[T]) Init() *OrderedStore[T]
Initialize the state
func (*OrderedStore[T]) Length ¶
func (s *OrderedStore[T]) Length() int
Returns the length of the store
func (*OrderedStore[T]) Set ¶
func (s *OrderedStore[T]) Set(id string, entity *T) error
Set an entity in the state
Click to show internal directories.
Click to hide internal directories.