mock

package
v0.2.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewPool

func NewPool[K comparable, V any]() *Pool[K, V]

func (*Pool[K, V]) Delete

func (mp *Pool[K, V]) Delete(key K) (bool, error)

func (*Pool[K, V]) LoadOrNew

func (mp *Pool[K, V]) LoadOrNew(key K, construct func() (networks.Destructor, error)) (V, bool, error)

type Reusable

type Reusable struct{}

func (*Reusable) Close

func (m *Reusable) Close() error

func (*Reusable) Destruct

func (m *Reusable) Destruct() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL