driverutil

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOptions

func ApplyOptions(dest any, opts ...Option) error

Types

type DriverBuilder

type DriverBuilder[D driver] func(ctx context.Context, opts ...Option) (D, error)

type DriverCache

type DriverCache[D driver] interface {
	Register(name string, builder DriverBuilder[D])
	Unregister(name string)
	Get(name string) (DriverBuilder[D], bool)
	List() []string
}

func NewDriverCache

func NewDriverCache[D driver]() DriverCache[D]

type Option

type Option interface {
	Apply(dest any) error
}

func NewOption

func NewOption[T any](key string, value T) Option

Jump to

Keyboard shortcuts

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