pool

package
v0.0.0-...-b1b21d8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: LGPL-3.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 Client

type Client[T any] struct {
	Err error
	// contains filtered or unexported fields
}

func NewClient

func NewClient[T any](preCtx context.Context, option ClientOption[T]) (*Client[T], error)

func (*Client[T]) Get

func (obj *Client[T]) Get(ctx context.Context) (T, bool, error)

type ClientOption

type ClientOption[T any] struct {
	New     func(context.Context) (T, error)
	Clear   func(context.Context, T) bool
	MaxSize int
}

Jump to

Keyboard shortcuts

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