pool

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory[T any] struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory[T any](new func(name string) (T, error)) *Factory[T]

NewFactory 创建单例工厂

func (*Factory[T]) Get

func (f *Factory[T]) Get(name string) (T, error)

Get 获取单例对象

Jump to

Keyboard shortcuts

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