Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriverName ¶
type DriverName = string
type Holder ¶
type Holder[D any] struct { Logger logging.Logger Drivers map[DriverName]D // contains filtered or unexported fields }
func (*Holder[D]) DriverNames ¶
DriverNames returns a sorted list of the names of the registered drivers.
func (*Holder[D]) Get ¶
func (h *Holder[D]) Get(name DriverName) (D, bool)
func (*Holder[D]) Register ¶
func (h *Holder[D]) Register(name DriverName, 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.
Click to show internal directories.
Click to hide internal directories.