Documentation ¶
Index ¶
- type Callback
- type IPool
- type Pool
- func (p *Pool) Cap() int
- func (p *Pool) Clear()
- func (p *Pool) ForEach(cb Callback)
- func (p *Pool) Get(key any) any
- func (p *Pool) GetOrPut(key, value any) (any, bool, *gerr.GatewayDError)
- func (p *Pool) Pool() *sync.Map
- func (p *Pool) Pop(key any) any
- func (p *Pool) Put(key, value any) *gerr.GatewayDError
- func (p *Pool) Remove(key any)
- func (p *Pool) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) ForEach ¶
ForEach iterates over the pool and calls the callback function for each key/value pair.
func (*Pool) GetOrPut ¶
GetOrPut returns the value for the given key if it exists, otherwise it adds the key/value pair to the pool.
func (*Pool) Put ¶
func (p *Pool) Put(key, value any) *gerr.GatewayDError
Put adds a new key/value pair to the pool.
Click to show internal directories.
Click to hide internal directories.