parameterdefaults

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package parameterdefaults manages lazily initialized default providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearCaches

func ClearCaches()

Types

type Lazy

type Lazy[T interface{ ClearCache() }] struct {
	// contains filtered or unexported fields
}

Lazy initializes one provider, retries failed initialization, and supports cancellation while waiting.

func New

func New[T interface{ ClearCache() }]() *Lazy[T]

func (*Lazy[T]) Get

func (l *Lazy[T]) Get(ctx context.Context, create func(context.Context) (T, error)) (T, error)

Jump to

Keyboard shortcuts

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