Documentation ¶
Index ¶
Constants ¶
View Source
const ( RandomEjection = EjectionMode("random-ejection") LRUEjection = EjectionMode("lru-ejection") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EjectionMode ¶
type EjectionMode string
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func NewHeroPool ¶
func NewHeroPool(sizeLimit uint32, ejectionMode EjectionMode) *Pool
func (*Pool) Add ¶
Add writes given entity into a poolEntity on the underlying entities linked-list. Return value is the index at which given entity is written on entities linked-list so that it can be accessed directly later.
func (Pool) All ¶ added in v0.24.1
func (p Pool) All() []PoolEntity
All returns all stored entities in this pool.
type PoolEntity ¶ added in v0.24.1
type PoolEntity struct {
// contains filtered or unexported fields
}
func (PoolEntity) Entity ¶ added in v0.24.1
func (p PoolEntity) Entity() flow.Entity
func (PoolEntity) Id ¶ added in v0.24.1
func (p PoolEntity) Id() flow.Identifier
Click to show internal directories.
Click to hide internal directories.