registry

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New() *Registry

New creates a new registry with no backends.

func (*Registry) Delete

func (r *Registry) Delete(name string) error

func (*Registry) Get

func (r *Registry) Get(name string) backend.Backend

Get returns the backend with the specified name, or an error if it does not exist.

func (*Registry) Names

func (r *Registry) Names() []string

Names returns a list of all backend names in the registry.

func (*Registry) New

func (r *Registry) New(path string) (backend.Backend, error)

New creates a new backend based on the provided URL, and adds it to the registry.

The URL must be valid for the backend type, and the backend name must be unique within the registry.

func (*Registry) Validate

func (*Registry) Validate(url *url.URL) (string, error)

Validate checks that the provided URL is valid for a supported backend type, and returns the unique name for that backend if valid.

Jump to

Keyboard shortcuts

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