Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("registry: not found")
ErrNotFound is returned when a resolver has no endpoint for the identifier. Chain skips this error and tries the next resolver. Other errors stop the chain.
Functions ¶
func IsNotFound ¶
IsNotFound reports whether err is or wraps ErrNotFound.
func Register ¶
func Register(scheme string, factory FactoryFunc)
Register associates a DSN scheme with a resolver factory.
Types ¶
type FactoryFunc ¶
FactoryFunc constructs a Resolver from a DSN and logger.
type Resolver ¶
Resolver maps an identifier to a store endpoint.
func Chain ¶
Chain returns a resolver that tries each resolver in order. ErrNotFound continues to the next resolver; any other error stops the chain.
func New ¶
New builds a Resolver from a DSN. Multiple DSNs may be comma-separated; they are tried in order and ErrNotFound falls through to the next.
Commas that sit inside a later `scheme://` token are treated as separators; commas inside inline JSON are left alone.