singletons

package
v1.6.27 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: AGPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustSingleton added in v1.5.39

func MustSingleton[S any](newInstance func() (S, error)) S

func MustSingletonKey added in v1.6.13

func MustSingletonKey[S any](key string, newInstance func() (S, error)) S

func Singleton

func Singleton[S any](newInstance func() (S, error)) (S, error)

func SingletonKey added in v1.6.13

func SingletonKey[S any](key string, newInstance func() (S, error)) (S, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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