drivers

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Holder

type Holder[K comparable, D any] struct {
	Logger logging.Logger

	Drivers map[K]D
	// contains filtered or unexported fields
}

func NewHolder

func NewHolder[K comparable, D any]() *Holder[K, D]

func (*Holder[K, D]) Get

func (h *Holder[K, D]) Get(name K) (D, bool)

func (*Holder[K, D]) Register

func (h *Holder[K, D]) Register(name K, driver D)

Register makes a driver available by the provided name. If Register is called twice with the same name or if driver is nil, it panics.

Jump to

Keyboard shortcuts

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